- Fixed bug #42512 (ip2long('255.255.255.255') should return 4294967295 on

64-bit PHP).
This commit is contained in:
Derick Rethans 2007-09-01 18:37:27 +00:00
parent b357cf9d9b
commit 773fe3adc7
2 changed files with 68 additions and 1 deletions

View file

@ -4284,7 +4284,7 @@ PHP_FUNCTION(ip2long)
*/
if (addr_len == sizeof("255.255.255.255") - 1 &&
!memcmp(addr, "255.255.255.255", sizeof("255.255.255.255") - 1)) {
RETURN_LONG(-1);
RETURN_LONG(0xFFFFFFFF);
}
RETURN_FALSE;