Skip to content
Snippets Groups Projects
Commit 5e496e28 authored by Daniel Axtens's avatar Daniel Axtens Committed by Julian Andres Klode
Browse files

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: default avatarDaniel Axtens <dja@axtens.net>
Reviewed-by: default avatarDaniel Kiper <daniel.kiper@oracle.com>
parent 907f100c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment