eog r4907 - in branches/gnome-2-24: . src



Author: friemann
Date: Sun Dec 14 22:25:15 2008
New Revision: 4907
URL: http://svn.gnome.org/viewvc/eog?rev=4907&view=rev

Log:
2008-12-14  Felix Riemann  <friemann svn gnome org>

	* src/eog-metadata-reader-png.c: (eog_metadata_reader_png_consume):
	Don't use a pointer->uint32 conversion to check the chunk
	configuration. Fixes SIGBUS crashes on SPARC systems.
	Fixes bug #564526 (Friedrich Oslage).


Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/src/eog-metadata-reader-png.c

Modified: branches/gnome-2-24/src/eog-metadata-reader-png.c
==============================================================================
--- branches/gnome-2-24/src/eog-metadata-reader-png.c	(original)
+++ branches/gnome-2-24/src/eog-metadata-reader-png.c	Sun Dec 14 22:25:15 2008
@@ -368,9 +368,10 @@
 
 			if (priv->state == EMR_CHECK_CRC) {
 				/* Check if it is actually an XMP chunk.
-				 * Throw it away if not. */
-				if ((memcmp (priv->xmp_chunk, "XML:com.adobe.xmp\0", 18) != 0)
-				    || (*(guint32*)(priv->xmp_chunk+18)) != 0) {
+				 * Throw it away if not.
+				 * The check has 4 extra \0's to check 
+				 * if the chunk is configured correctly. */
+				if (memcmp (priv->xmp_chunk, "XML:com.adobe.xmp\0\0\0\0\0", 22) != 0) {
 					priv->state = EMR_SKIP_CRC;
 					g_free (priv->xmp_chunk);
 					priv->xmp_chunk = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]