jani Thu Aug 16 23:05:43 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard basic_functions.c
Log:
- Check the length too (just like in HEAD)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.60&r2=1.725.2.31.2.61&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.60
php-src/ext/standard/basic_functions.c:1.725.2.31.2.61
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.60 Thu Aug 16
22:17:10 2007
+++ php-src/ext/standard/basic_functions.c Thu Aug 16 23:05:43 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.31.2.60 2007/08/16 22:17:10 jani Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.61 2007/08/16 23:05:43 jani Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -4338,7 +4338,8 @@
/* the only special case when we should return -1 ourselves,
* because inet_addr() considers it wrong.
*/
- if (!memcmp(Z_STRVAL_PP(str), "255.255.255.255",
sizeof("255.255.255.255") - 1)) {
+ if (Z_STRLEN_PP(str) == sizeof("255.255.255.255") - 1 &&
+ !memcmp(Z_STRVAL_PP(str), "255.255.255.255",
sizeof("255.255.255.255") - 1)) {
RETURN_LONG(-1);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php