eog r4906 - in trunk: . src
- From: friemann svn gnome org
- To: svn-commits-list gnome org
- Subject: eog r4906 - in trunk: . src
- Date: Sun, 14 Dec 2008 22:24:54 +0000 (UTC)
Author: friemann
Date: Sun Dec 14 22:24:54 2008
New Revision: 4906
URL: http://svn.gnome.org/viewvc/eog?rev=4906&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:
trunk/ChangeLog
trunk/src/eog-metadata-reader-png.c
Modified: trunk/src/eog-metadata-reader-png.c
==============================================================================
--- trunk/src/eog-metadata-reader-png.c (original)
+++ trunk/src/eog-metadata-reader-png.c Sun Dec 14 22:24:54 2008
@@ -362,9 +362,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]