mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibGfx: Don't proceed with GIF format sniffing if stream read fails
This commit is contained in:
@@ -111,6 +111,9 @@ Optional<GIFFormat> decode_gif_header(BufferStream& stream)
|
||||
for (int i = 0; i < 6; ++i)
|
||||
stream >> header[i];
|
||||
|
||||
if (stream.handle_read_failure())
|
||||
return {};
|
||||
|
||||
if (!memcmp(header, valid_header_87, sizeof(header)))
|
||||
return GIFFormat::GIF87a;
|
||||
else if (!memcmp(header, valid_header_89, sizeof(header)))
|
||||
|
||||
Reference in New Issue
Block a user