mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
Fixed bug #29443 (Sanity check for wbmp detection).
This commit is contained in:
parent
381adeadff
commit
972940509f
@ -955,6 +955,11 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check T
|
||||
}
|
||||
height = (height << 7) | (i & 0x7f);
|
||||
} while (i & 0x80);
|
||||
|
||||
/* maximum valid sizes for wbmp (although 127x127 may be a more accurate one) */
|
||||
if (height > 2048 || width > 2048) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!check) {
|
||||
(*result)->width = width;
|
||||
|
Loading…
Reference in New Issue
Block a user