mirror of
https://github.com/php/php-src.git
synced 2025-01-10 13:03:54 +08:00
Check correction (Thanks Andi).
This commit is contained in:
parent
fbfde0fc0e
commit
c6b04cb48a
@ -1189,7 +1189,7 @@ PHP_FUNCTION(ip2long)
|
||||
|
||||
convert_to_string_ex(str);
|
||||
|
||||
if (Z_STRVAL_PP(str) == "" || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) {
|
||||
if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) {
|
||||
RETURN_LONG(-1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user