mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
- Fix for bug #13413
This commit is contained in:
parent
fc05a725eb
commit
6852a1e704
@ -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] == ' ') {
|
||||
|
Loading…
Reference in New Issue
Block a user