From: Derick Rethans Date: Sat, 20 Oct 2001 10:58:33 +0000 (+0000) Subject: - Fix for bug #13413 X-Git-Tag: POST_PARAMETER_PARSING_API~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6852a1e7041dad51734033105bf236404d31315c;p=php - Fix for bug #13413 --- diff --git a/ext/standard/url.c b/ext/standard/url.c index 00694579cd..cdaac5fb9c 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -245,7 +245,7 @@ PHPAPI char *php_url_encode(char *s, int len, int *new_length) register int x, y; unsigned char *str; - str = (unsigned char *) emalloc(3 * strlen(s) + 1); + str = (unsigned char *) emalloc(3 * len + 1); for (x = 0, y = 0; len--; x++, y++) { str[y] = (unsigned char) s[x]; if (str[y] == ' ') {