summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx/GIFLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGfx/GIFLoader.cpp')
-rw-r--r--Libraries/LibGfx/GIFLoader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp
index 421b7dbe75..6f9272d607 100644
--- a/Libraries/LibGfx/GIFLoader.cpp
+++ b/Libraries/LibGfx/GIFLoader.cpp
@@ -446,6 +446,9 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
u8 sentinel = 0;
stream >> sentinel;
+ if (stream.handle_any_error())
+ return false;
+
if (sentinel == 0x21) {
u8 extension_type = 0;
stream >> extension_type;