mirror of
https://git.proxmox.com/git/grub2
synced 2025-10-04 07:50:49 +00:00
video/readers/png: Refuse to handle multiple image headers
This causes the bitmap to be leaked. Do not permit multiple image headers. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
907f100c84
commit
5e496e28b3
@ -258,6 +258,9 @@ grub_png_decode_image_header (struct grub_png_data *data)
|
||||
int color_bits;
|
||||
enum grub_video_blit_format blt;
|
||||
|
||||
if (data->image_width || data->image_height)
|
||||
return grub_error (GRUB_ERR_BAD_FILE_TYPE, "png: two image headers found");
|
||||
|
||||
data->image_width = grub_png_get_dword (data);
|
||||
data->image_height = grub_png_get_dword (data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user