diff -ruN a//debian/changelog b//debian/changelog --- a//debian/changelog 2010-08-23 05:19:11.000000000 +0500 +++ b//debian/changelog 2010-11-09 21:49:44.000000000 +0500 @@ -1,3 +1,9 @@ +gexiv2 (0.2.0-0ubuntu3) maverick-proposed; urgency=low + + * don't crash when importing large amount of images (LP: #636161) + + -- Omer Akram Tue, 09 Nov 2010 21:49:28 +0500 + gexiv2 (0.2.0-0ubuntu2) maverick; urgency=low * debian/libgexiv2-dev.install: diff -ruN a//debian/patches/lp_636161.patch b//debian/patches/lp_636161.patch --- a//debian/patches/lp_636161.patch 1970-01-01 05:00:00.000000000 +0500 +++ b//debian/patches/lp_636161.patch 2010-11-09 21:46:42.000000000 +0500 @@ -0,0 +1,16 @@ +diff -ruN a//gexiv2-metadata.cpp b//gexiv2-metadata.cpp +--- a//gexiv2-metadata.cpp 1970-01-01 05:00:00.000000000 +0500 ++++ b//gexiv2-metadata.cpp 2010-11-09 21:44:46.719246554 +0500 +@@ -0,0 +1,12 @@ ++ ++ // TODO: This was added in response to http://trac.yorba.org/ticket/2514 ++ // The user supplied a file to us with two Exif.Image.Orientation fields, one reported (the ++ // first) as zero by exiv2. I discovered that field has a count() of zero, or is emtpy, ++ // which causes a segfault when the iterator is dereferenced. ++ // ++ // This searches for the first matching non-empty key. A better solution would be to guard ++ // against this in all searches for all domains, but that's too much of a change for now. ++ // We'll probably need to do this for the next release. ++ while (it != exif_data.end() && it->count() == 0) ++ it++; ++ diff -ruN a//debian/patches/series b//debian/patches/series --- a//debian/patches/series 1970-01-01 05:00:00.000000000 +0500 +++ b//debian/patches/series 2010-11-09 21:46:42.000000000 +0500 @@ -0,0 +1 @@ +lp_636161.patch diff -ruN a//debian/.pc/.quilt_patches b//debian/.pc/.quilt_patches --- a//debian/.pc/.quilt_patches 1970-01-01 05:00:00.000000000 +0500 +++ b//debian/.pc/.quilt_patches 2010-11-09 21:46:59.000000000 +0500 @@ -0,0 +1 @@ +patches diff -ruN a//debian/.pc/.quilt_series b//debian/.pc/.quilt_series --- a//debian/.pc/.quilt_series 1970-01-01 05:00:00.000000000 +0500 +++ b//debian/.pc/.quilt_series 2010-11-09 21:46:59.000000000 +0500 @@ -0,0 +1 @@ +series diff -ruN a//debian/.pc/.version b//debian/.pc/.version --- a//debian/.pc/.version 1970-01-01 05:00:00.000000000 +0500 +++ b//debian/.pc/.version 2010-11-09 21:46:59.000000000 +0500 @@ -0,0 +1 @@ +2 diff -ruN a//gexiv2-metadata.cpp b//gexiv2-metadata.cpp --- a//gexiv2-metadata.cpp 1970-01-01 05:00:00.000000000 +0500 +++ b//gexiv2-metadata.cpp 2010-11-09 21:48:26.000000000 +0500 @@ -0,0 +1,12 @@ + + // TODO: This was added in response to http://trac.yorba.org/ticket/2514 + // The user supplied a file to us with two Exif.Image.Orientation fields, one reported (the + // first) as zero by exiv2. I discovered that field has a count() of zero, or is emtpy, + // which causes a segfault when the iterator is dereferenced. + // + // This searches for the first matching non-empty key. A better solution would be to guard + // against this in all searches for all domains, but that's too much of a change for now. + // We'll probably need to do this for the next release. + while (it != exif_data.end() && it->count() == 0) + it++; + diff -ruN a//.pc/applied-patches b//.pc/applied-patches --- a//.pc/applied-patches 1970-01-01 05:00:00.000000000 +0500 +++ b//.pc/applied-patches 2010-11-09 21:48:26.000000000 +0500 @@ -0,0 +1 @@ +lp_636161.patch