From b6d3a912fd89a70684fcd1e202e5f9ad1472ee83 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Wed, 25 Aug 2004 22:32:54 +0000 Subject: [PATCH] Guard against bogus logical screen dimensions. Fixes bug #151053. 2004-08-25 Manish Singh * plug-ins/common/gifload.c: Guard against bogus logical screen dimensions. Fixes bug #151053. --- ChangeLog | 5 +++++ plug-ins/common/gifload.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index a4e2e9b485..e8594aa126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-25 Manish Singh + + * plug-ins/common/gifload.c: Guard against bogus logical screen + dimensions. Fixes bug #151053. + 2004-08-26 DindinX * app/widgets/gimppreview-popup.c diff --git a/plug-ins/common/gifload.c b/plug-ins/common/gifload.c index 37811082f6..22ffdb6a4c 100644 --- a/plug-ins/common/gifload.c +++ b/plug-ins/common/gifload.c @@ -844,6 +844,13 @@ ReadImage (FILE *fd, if (frame_number == 1 ) { + /* Guard against bogus logical screen size values */ + if (screenwidth == 0) + screenwidth = len; + + if (screenheight == 0) + screenheight = height; + image_ID = gimp_image_new (screenwidth, screenheight, GIMP_INDEXED); gimp_image_set_filename (image_ID, filename);