diff options
author | Stanislav Malyshev <stas@php.net> | 2020-04-13 21:07:04 -0700 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-04-14 09:01:37 +0200 |
commit | 2c0d56cc150ada2355319c418c0c6e8321ef7b0f (patch) | |
tree | f12ea3dc58c3077109e13a181c8688f1c5b83b43 | |
parent | 242589457b07173abb36e3ef0da5e57e077d2f87 (diff) | |
download | php-git-PHP-7.3.17.tar.gz |
Fix bug #79465 - use unsigneds as indexes.php-7.3.17PHP-7.3.17
(cherry picked from commit 9d6bf8221b05f86ce5875832f0f646c4c1f218be)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/standard/url.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -36,6 +36,7 @@ PHP NEWS - Standard: . Fixed bug #79330 (shell_exec() silently truncates after a null byte). (stas) + . Fixed bug #79465 (OOB Read in urldecode()). (stas) . Fixed bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline). (Christian Schneider) diff --git a/ext/standard/url.c b/ext/standard/url.c index 6880e40a01..20254de0c5 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -547,7 +547,7 @@ PHPAPI size_t php_url_decode(char *str, size_t len) #ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); #else - *dest = os_toebcdic[(char) php_htoi(data + 1)]; + *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)]; #endif data += 2; len -= 2; @@ -643,7 +643,7 @@ PHPAPI size_t php_raw_url_decode(char *str, size_t len) #ifndef CHARSET_EBCDIC *dest = (char) php_htoi(data + 1); #else - *dest = os_toebcdic[(char) php_htoi(data + 1)]; + *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)]; #endif data += 2; len -= 2; |