diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2008-10-20 23:22:45 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2008-10-20 23:22:45 +0000 |
commit | 2357d51900dd2ab9667a0f76519d34c2175c6669 (patch) | |
tree | dbb6a968c964069309d7155a42dd9a6253424217 | |
parent | 2f3b8856eeba42a4e52aa07784a5d62d8d90e5fc (diff) | |
download | php-git-2357d51900dd2ab9667a0f76519d34c2175c6669.tar.gz |
Fixed bug #46343 (IPv6 address filter accepts invalid address)
-rw-r--r-- | ext/filter/logical_filters.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 36317e8311..7f7cfbc688 100644 --- a/ext/filter/logical_filters.c +++ b/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; |