]> granicus.if.org Git - transmission/commitdiff
Go back to using memcmp in libtransmission/net.c
authorMaciej Wolny <maciekwolny123@gmail.com>
Thu, 20 Oct 2016 15:35:46 +0000 (17:35 +0200)
committerMaciej Wolny <maciekwolny123@gmail.com>
Thu, 20 Oct 2016 15:35:46 +0000 (17:35 +0200)
libtransmission/net.c

index 7d1416d89ec6c2bde49af299431c2225cf67bad4..cdd459853c80853b3245ae63c8d83a83f877146f 100644 (file)
@@ -639,7 +639,7 @@ isMartianAddr (const struct tr_address * a)
         case TR_AF_INET6: {
             const unsigned char * address = (const unsigned char*)&a->addr.addr6;
             return (address[0] == 0xFF) ||
-                 (strncmp (address, zeroes, 15) == 0 &&
+                 (memcmp (address, zeroes, 15) == 0 &&
                   (address[15] == 0 || address[15] == 1));
         }