mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-21 00:05:30 +00:00
Make sure that palette entries don't exceed max.
This commit is contained in:
parent
cb8deab105
commit
1389346cbf
@ -550,6 +550,9 @@ static bool png_append_idat(FILE *file, const struct png_chunk *chunk, struct id
|
||||
|
||||
static bool png_read_plte(FILE *file, uint32_t *buffer, unsigned entries)
|
||||
{
|
||||
if (entries > 256)
|
||||
return false;
|
||||
|
||||
uint8_t buf[256 * 3];
|
||||
if (fread(buf, 3, entries, file) != entries)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user