summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-jpeg.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2022-08-09 23:11:31 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2022-08-09 23:11:31 +0100
commitb78a83a76e88e95c16fb8534a7c19f15d38c43af (patch)
tree87240fa273dd6527c14a92b83ae035b057819054 /gdk-pixbuf/io-jpeg.c
parent3313034f3cba6a7532bcf87e9756c0d823243dc4 (diff)
downloadgdk-pixbuf-b78a83a76e88e95c16fb8534a7c19f15d38c43af.tar.gz
jpeg: Avoid an infinite loop with invalid imagesebassi/issue-209
When loading an invalid image with a missing EOI marker we end up triggering an infinite loop inside libjpeg. Original patch by: Sam Ezeh <sam.z.ezeh@gmail.com> Fixes: #209
Diffstat (limited to 'gdk-pixbuf/io-jpeg.c')
-rw-r--r--gdk-pixbuf/io-jpeg.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index 22f4174fe..5a92aa4c4 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -879,7 +879,6 @@ gdk_pixbuf__jpeg_image_stop_load (gpointer data, GError **error)
src->buffer[src->skip_next] = (JOCTET) 0xFF;
src->buffer[src->skip_next + 1] = (JOCTET) JPEG_EOI;
src->pub.next_input_byte = src->buffer + src->skip_next;
- src->pub.bytes_in_buffer = 2;
gdk_pixbuf__jpeg_image_load_lines (context, NULL);
}