#41995 [Opn->Fbk]: ip2long() sometimes return wrong value

From: Date: Sat, 14 Jul 2007 10:32:22 +0000
Subject: #41995 [Opn->Fbk]: ip2long() sometimes return wrong value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115067@lists.php.net to get a copy of this message
ID: 41995 Updated by: derick@php.net Reported By: pigmey_avi at gorodok dot net -Status: Open +Status: Feedback Bug Type: Network related PHP Version: 4.4.7 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2007-07-14 07:59:02] pigmey_avi at gorodok dot net Description: ------------ When ip2long() encountered triplet that can be represent as octal number, the function represent it as octal. For instance, when ip is '10.0.0.011', the last triplet will be readed as 9, becouse 11 in 8 base is 9. So, sometimes, ip2long() returns wrong value. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41995&edit=1

« previous php.bugs (#115067) next »