Browse Source

MFB:Fixed bug #46343 (IPv6 address filter accepts invalid address)

PHP-5.2.1RC1
Ilia Alshanetsky 18 years ago
parent
commit
1b0d1d6bcb
  1. 1
      NEWS
  2. 3
      ext/filter/logical_filters.c

1
NEWS

@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Oct 2008, PHP 5.2.7RC2
- Fixed bug #46343 (IPv6 address filter accepts invalid address). (Ilia)
- Fixed bug #46341 (Added missing validation checks into define() for class
constants). (Ilia)
- Fixed bug #46335 (DOMText::splitText doesn't handle multibyte characters).

3
ext/filter/logical_filters.c

@ -529,6 +529,7 @@ static int _php_filter_validate_ipv6(char *str, int str_len TSRMLS_DC) /* {{{ */
char *ipv4;
char *end;
int ip4elm[4];
char *s = str;
if (!memchr(str, ':', str_len)) {
return 0;
@ -568,6 +569,8 @@ static int _php_filter_validate_ipv6(char *str, int str_len TSRMLS_DC) /* {{{ */
return 1;
}
compressed = 1;
} else if ((str - 1) == s) {
return 0;
}
}
n = 0;

Loading…
Cancel
Save