< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Maybe a bug in DnsUtil


It's iOS, here the error details in debugger:

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000

Thread : Crashed: com.apple.main-thread
0  libsystem_platform.dylib       0x322557b4 _platform_strchr + 12
1  Roamer                         0x0033978b resip::DnsUtil::getLocalHostName()
2  Roamer                         0x0033978b resip::DnsUtil::getLocalHostName()


So I guess may be the result is NULL cause app crash ?

On Sun, Nov 2, 2014 at 10:49 PM, <slgodin@xxxxxxxxx> wrote:
Hi Karlsson,

What OS is this happening on?

Scott

Sent from my iPhone

On Nov 1, 2014, at 9:15 PM, Karlsson <boost.regex@xxxxxxxxx> wrote:

In the DnsUtil.xx, below code:

      int res = getaddrinfo(buffer, 0, &hints, &result);
      if (!res) 
      {
         // !jf! this should really use the Data class 
         if (strchr(result->ai_canonname, '.') != 0) 
         {
            strncpy(buffer, result->ai_canonname, sizeof(buffer));
         }
      }

It's seems sometime the result is NULL will cause the app crashed.

BRs
_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/