summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-wbmp.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-02-12 23:28:05 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-02-12 23:28:05 +0000
commita9a06ee44e440522eaa56d4f4f300ffe91a5083d (patch)
treeab615c03d69aa578d07bc20dbf64c910018309fb /gdk-pixbuf/io-wbmp.c
parent67051d64f4f335e8a578602882e215a895614ea5 (diff)
downloadgtk+-a9a06ee44e440522eaa56d4f4f300ffe91a5083d.tar.gz
Add a (#ifdef 0'ed) test provoking a segfault in TIFFReadDirectory().
* test-images.h (tiff1_test_3), test-loaders.c (main): Add a (#ifdef 0'ed) test provoking a segfault in TIFFReadDirectory(). * io-ico.c (DecodeHeader): Check that pixbuf could be allocated. * test-images.h (ico_test_2), test-loaders.c (main): Test the previous change. * io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment): Don't write beyond the end of buffer if width % 8 != 0. * io-tga.c (try_preload): Enforce that ctx->hdr->type is one of the supported types, otherwise parse_data_for_row () will not make any progress, leading to an infinite loop.
Diffstat (limited to 'gdk-pixbuf/io-wbmp.c')
-rw-r--r--gdk-pixbuf/io-wbmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk-pixbuf/io-wbmp.c b/gdk-pixbuf/io-wbmp.c
index d4db78386d..7bb8e11722 100644
--- a/gdk-pixbuf/io-wbmp.c
+++ b/gdk-pixbuf/io-wbmp.c
@@ -333,6 +333,9 @@ static gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data,
{
guchar pixval;
+ if (context->curx + (7 - xoff) == context->width)
+ break;
+
if(byte & (1<<xoff))
pixval = 0xFF;
else