Bugzilla – Attachment 218679 Details for
Bug 386493
gdk-pixbuf loader broken for jpegs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
gtk2-bnc386493-bgo494667-jpeg-loader-fixes.diff
gtk2-bnc386493-bgo494667-jpeg-loader-fixes.diff (text/plain), 1.64 KB, created by
Federico Mena Quintero
on 2008-05-28 16:47:29 UTC
(
hide
)
Description:
gtk2-bnc386493-bgo494667-jpeg-loader-fixes.diff
Filename:
MIME Type:
Creator:
Federico Mena Quintero
Created:
2008-05-28 16:47:29 UTC
Size:
1.64 KB
patch
obsolete
>https://bugzilla.novell.com/show_bug.cgi?id=386493 >http://bugzilla.gnome.org/show_bug.cgi?id=494667 > >GdkPixbuf JPEG loader has trouble with certain files. > > 2007-12-09 Matthias Clasen <mclasen@redhat.com> > > * io-jpeg.c: Fix the spinguard logic for big buffers. > (#494667, Ed Catmur) > >diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c >index fdcc3e2..7df7e1c 100644 >--- a/gdk-pixbuf/io-jpeg.c >+++ b/gdk-pixbuf/io-jpeg.c >@@ -812,7 +812,7 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data, > struct jpeg_decompress_struct *cinfo; > my_src_ptr src; > guint num_left, num_copy; >- guint last_bytes_left; >+ guint last_num_left, last_bytes_left; > guint spinguard; > gboolean first; > const guchar *bufhd; >@@ -853,6 +853,7 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data, > if (num_left == 0) > return TRUE; > >+ last_num_left = num_left; > last_bytes_left = 0; > spinguard = 0; > first = TRUE; >@@ -880,10 +881,13 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data, > if (first) { > last_bytes_left = src->pub.bytes_in_buffer; > first = FALSE; >- } else if (src->pub.bytes_in_buffer == last_bytes_left) >+ } else if (src->pub.bytes_in_buffer == last_bytes_left >+ && num_left == last_num_left) { > spinguard++; >- else >+ } else { > last_bytes_left = src->pub.bytes_in_buffer; >+ last_num_left = num_left; >+ } > > /* should not go through twice and not pull bytes out of buf */ > if (spinguard > 2)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 386493
: 218679