]> granicus.if.org Git - php/commitdiff
fix the chunks fix
authorStanislav Malyshev <stas@php.net>
Wed, 6 Jun 2007 18:15:41 +0000 (18:15 +0000)
committerStanislav Malyshev <stas@php.net>
Wed, 6 Jun 2007 18:15:41 +0000 (18:15 +0000)
ext/standard/string.c

index 161f7e51d598e740cae85268640c878900475257..d22e85924d8ae9940132fe909a99768e2755b217 100644 (file)
@@ -1969,7 +1969,7 @@ static char *php_chunk_split(char *src, int srclen, char *end, int endlen, int c
                return NULL;
        }
        out_len = chunks + 1;
-       if(out_len > INT_MAX/endlen) {
+       if(endlen !=0 && out_len > INT_MAX/endlen) {
                return NULL;
        }
        out_len *= endlen;