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

[reSIProcate-users] Maybe a bug in DnsUtil


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