On 17.08.2007 02:17, Jani Taskinen wrote:
- if (!memcmp(Z_STRVAL_PP(str), "255.255.255.255",
Z_STRLEN_PP(str))) {
+ if (!memcmp(Z_STRVAL_PP(str), "255.255.255.255",
sizeof("255.255.255.255") - 1)) {
RETURN_LONG(-1);
}
Are you sure it is correct to compare first 15 bytes of _empty string_ with
"255.255.255.255"?
I'd say it should look like this:
if (Z_STRLEN_PP(str) == (sizeof("255.255.255.255") - 1) && !memcmp(Z_STRVAL_PP(str),
"255.255.255.255", Z_STRLEN_PP(str))) {
--
Wbr,
Antony Dovgal
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php