summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Riemann <friemann@svn.gnome.org>2009-05-22 11:39:09 +0100
committerFelix Riemann <friemann@svn.gnome.org>2009-05-22 13:23:59 +0200
commit06ada2d5f6106c4e85c2b02dbaadc70638b8206a (patch)
treebdbbc30769f5edacca7ed4a44ccf13c58a3ac652
parent998df96a45dd7bd399402d8fc985742cc74c6ffd (diff)
downloadeog-06ada2d5f6106c4e85c2b02dbaadc70638b8206a.tar.gz
Bug 583448 – Crash on exif data
Secure Exif data updating with a mutex. Should fix crashes when reading the Exif block during the update. This was made visible be the leak fix from commit a10ab24418ce04dbef3d6809105e6572cb07db69 .
-rw-r--r--ChangeLog6
-rw-r--r--src/eog-image.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a25af04..66f8bc6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-22 Felix Riemann <friemann@svn.gnome.org>
+
+ * src/eog-image.c (eog_image_set_exif_data):
+ Secure Exif data updating with a mutex. Should fix crashes when
+ reading the Exif block during the update. Fixes bug #583448.
+
2009-05-18 Felix Riemann <friemann@svn.gnome.org>
* configure.ac: Post-release version bump.
diff --git a/src/eog-image.c b/src/eog-image.c
index a02ca82d..ff812d2c 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -754,10 +754,12 @@ eog_image_set_exif_data (EogImage *img, EogMetadataReader *md_reader)
priv = img->priv;
#ifdef HAVE_EXIF
+ g_mutex_lock (priv->status_mutex);
if (priv->exif) {
exif_data_unref (priv->exif);
}
priv->exif = eog_metadata_reader_get_exif_data (md_reader);
+ g_mutex_unlock (priv->status_mutex);
priv->exif_chunk = NULL;
priv->exif_chunk_len = 0;