]> granicus.if.org Git - php/commitdiff
Binary safety fix for inet_pton()
authorSara Golemon <pollita@php.net>
Sat, 7 Aug 2004 05:11:26 +0000 (05:11 +0000)
committerSara Golemon <pollita@php.net>
Sat, 7 Aug 2004 05:11:26 +0000 (05:11 +0000)
ext/standard/basic_functions.c

index f364719189710b51d22c8120671f79bc2a55eb72..ada028fd7ca297c8113d34e6b5f86b89aa1368aa 100644 (file)
@@ -1345,7 +1345,7 @@ PHP_FUNCTION(inet_pton)
                RETURN_FALSE;
        }
 
-       RETURN_STRING(buffer, 1);
+       RETURN_STRINGL(buffer, af == AF_INET ? 4 : 16, 1);
 }
 /* }}} */
 #endif /* HAVE_INET_PTON */