[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_2_2_BRANCH: kdelibs/kdecore
From:       Waldo Bastian <bastian () kde ! org>
Date:       2002-12-13 10:18:08
[Download RAW message or body]

CVS commit by waba: 

strcpy fixes


  M +4 -4      netsupp.cpp   1.21.2.4


--- kdelibs/kdecore/netsupp.cpp  #1.21.2.3:1.21.2.4
@@ -927,5 +927,5 @@ int getnameinfo(const struct sockaddr *s
       if (servlen && serv != NULL)
         *serv = '\0';
-      if (host == NULL || hostlen < strlen(s._sun->sun_path))
+      if (host != NULL && hostlen > strlen(s._sun->sun_path))
         strcpy(host, s._sun->sun_path);
 
@@ -1009,5 +1009,5 @@ const char* inet_ntop(int af, const void
       sprintf(buf2, "%u.%u.%u.%u", data[0], data[1], data[2], data[3]);
 
-      if (len >= strlen(buf2))
+      if (len > strlen(buf2))
         {
           strcpy(buf, buf2);
@@ -1078,5 +1078,5 @@ const char* inet_ntop(int af, const void
         }
 
-      if (strlen(buf2) <= len)
+      if (strlen(buf2) < len)
         {
           strcpy(buf, buf2);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic