diff -Nru thumbnailer-1.0+14.04.20140307/debian/changelog thumbnailer-1.0+14.04.20140319/debian/changelog --- thumbnailer-1.0+14.04.20140307/debian/changelog 2014-03-19 20:21:12.000000000 +0000 +++ thumbnailer-1.0+14.04.20140319/debian/changelog 2014-03-19 20:21:13.000000000 +0000 @@ -1,3 +1,10 @@ +thumbnailer (1.0+14.04.20140319-0ubuntu1) trusty; urgency=low + + [ Jussi Pakkanen ] + * Prevent crash if exif entry is null. (LP: #1294274) + + -- Ubuntu daily release Wed, 19 Mar 2014 20:16:40 +0000 + thumbnailer (1.0+14.04.20140307-0ubuntu1) trusty; urgency=low [ Jussi Pakkanen ] diff -Nru thumbnailer-1.0+14.04.20140307/src/imagescaler.cpp thumbnailer-1.0+14.04.20140319/src/imagescaler.cpp --- thumbnailer-1.0+14.04.20140307/src/imagescaler.cpp 2014-03-07 15:41:08.000000000 +0000 +++ thumbnailer-1.0+14.04.20140319/src/imagescaler.cpp 2014-03-19 20:16:30.000000000 +0000 @@ -62,15 +62,17 @@ // https://bugzilla.gnome.org/show_bug.cgi?id=725582 if(ed) { ExifEntry *e = exif_data_get_entry(ed, EXIF_TAG_ORIENTATION); - int orientation = exif_get_short(e->data, exif_data_get_byte_order(ed)); - if(orientation == 6) { - rot = gdk_pixbuf_rotate_simple(src, GDK_PIXBUF_ROTATE_CLOCKWISE); - } else if (orientation == 8) { - rot = gdk_pixbuf_rotate_simple(src, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); - } else if (orientation == 3) { - rot = gdk_pixbuf_rotate_simple(src, GDK_PIXBUF_ROTATE_UPSIDEDOWN); - } else { - // We don't do mirrored images, at least not yet. + if(e) { + int orientation = exif_get_short(e->data, exif_data_get_byte_order(ed)); + if(orientation == 6) { + rot = gdk_pixbuf_rotate_simple(src, GDK_PIXBUF_ROTATE_CLOCKWISE); + } else if (orientation == 8) { + rot = gdk_pixbuf_rotate_simple(src, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); + } else if (orientation == 3) { + rot = gdk_pixbuf_rotate_simple(src, GDK_PIXBUF_ROTATE_UPSIDEDOWN); + } else { + // We don't do mirrored images, at least not yet. + } } } if(!rot) {