After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 448913 - eog crashes on exit on some JPEG files
eog crashes on exit on some JPEG files
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-18 20:50 UTC by Michael Wolf
Modified: 2007-06-20 10:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Wolf 2007-06-18 20:50:27 UTC
This is based on https://bugzilla.novell.com/show_bug.cgi?id=214690, about eog crashing with some jpg files.

https://bugzilla.novell.com/show_bug.cgi?id=214690#c2 contains a file which will cause the crash, and https://bugzilla.novell.com/show_bug.cgi?id=214690#c8 a patch.

The patch applies against 2.16.x, 2.18.x, and trunk; maybe older versions too.  It is already included in SuSE's builds.

I can submit it to svn if you like...
Comment 1 Felix Riemann 2007-06-19 08:43:57 UTC
From what I can see I have already committed a similar fix to the gnome-2-18 branch and trunk some time ago. (rev. 3531, 3532)

Comment 2 Felix Riemann 2007-06-19 08:45:10 UTC
...last paragraph got lost.

Are sure it still applies (besides the gnome-2-16 branch)?
Comment 3 Michael Wolf 2007-06-19 15:16:56 UTC
It applied cleanly to the checkout of trunk I did about 18 hours ago, and to eog-2.18.2.

It maybe, of course, that you solved the same problem differently...
Comment 4 Claudio Saavedra 2007-06-19 23:39:26 UTC
I see it already fixed in 2.18 and trunk:

http://svn.gnome.org/viewcvs/eog/trunk/src/eog-image.c?r1=3513&r2=3531
http://svn.gnome.org/viewcvs/eog/branches/gnome-2-18/libeog/eog-image.c?r1=3512&r2=3532

--- branches/eog-ng/src/eog-image.c	2007/02/02 23:32:58	3513
+++ branches/eog-ng/src/eog-image.c	2007/02/07 17:30:01	3531
@@ -290,13 +290,23 @@
 	/* Update image width */	
 	entry = exif_content_get_entry (priv->exif->ifd [EXIF_IFD_EXIF], EXIF_TAG_PIXEL_X_DIMENSION);
 	if (entry != NULL && (priv->width >= 0)) {
-		exif_set_long (entry->data, bo, priv->width);
+		if (entry->format == EXIF_FORMAT_LONG)
+			exif_set_long (entry->data, bo, priv->width);
+		else if (entry->format == EXIF_FORMAT_SHORT)
+			exif_set_short (entry->data, bo, priv->width);
+		else
+			g_warning ("Exif entry has unsupported size");
 	}
 	
 	/* Update image height */	
 	entry = exif_content_get_entry (priv->exif->ifd [EXIF_IFD_EXIF], EXIF_TAG_PIXEL_Y_DIMENSION);
 	if (entry != NULL && (priv->height >= 0)) {
-		exif_set_long (entry->data, bo, priv->height);
+		if (entry->format == EXIF_FORMAT_LONG)
+			exif_set_long (entry->data, bo, priv->height);
+		else if (entry->format == EXIF_FORMAT_SHORT)
+			exif_set_short (entry->data, bo, priv->height);
+		else
+			g_warning ("Exif entry has unsupported size");
 	}
 #endif
 }

Comment 5 Felix Riemann 2007-06-20 10:50:17 UTC
Yes, I checked again and it is already in. I am closing this then.

But, thanks for submitting it anyways. :-)