mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
We make sure that negative values are properly compared.
This commit is contained in:
parent
902e19ddf3
commit
ebdaeb8572
2 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue