diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-03-12 13:04:04 +0100 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2020-03-16 22:42:15 -0700 |
commit | ebdaeb85728dde9530d2be50307e03e389bae3a9 (patch) | |
tree | 17b4e22f07e03c9fdbc98827737d2f0dc7153a45 /ext/mbstring/php_unicode.c | |
parent | 902e19ddf339d0ca7149393a66ec0697f13b9d80 (diff) | |
download | php-git-ebdaeb85728dde9530d2be50307e03e389bae3a9.tar.gz |
Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
We make sure that negative values are properly compared.
Diffstat (limited to 'ext/mbstring/php_unicode.c')
-rw-r--r-- | ext/mbstring/php_unicode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index df16f20955..ba84dc55c7 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -313,7 +313,7 @@ static int convert_case_filter(int c, void *void_data) /* Handle invalid characters early, as we assign special meaning to * codepoints above 0xffffff. */ - if (UNEXPECTED(c > 0xffffff)) { + if (UNEXPECTED((unsigned) c > 0xffffff)) { (*data->next_filter->filter_function)(c, data->next_filter); return 0; } |