Hello Dainel,

Attached is one more patch for gpscorrelate. It fixes crash with incomplete
GPS tags. See quoted message for explanation.

You can find original bug report here:
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487873

It looks very similar to
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515654

5 березня 2009 о 00:26 +0100 Giovanni Mascellani написав(-ла):
> With a friend of mine I managed to find a probable source for this bug:
> the program crashes in exif-gps.cpp, line 142.
> 
>   GPSData = ExifRead["Exif.GPSInfo.GPSMapDatum"];
> 
> GPSData was previously declared (line 129)
> 
>   Exiv2::Exifdatum& GPSData = ExifRead["Exif.GPSInfo.GPSVersionID"];
> 
> I fail to understand why you would want to write the value of the tag
> Exif.GPSInfo.GPSMapDatum on the value of the tag
> Exif.GPSInfo.GPSVersionID (GPSData is a reference). Moreover, trying
> this write results in a segmentation fault. Commenting out line 142
> seems to fix the problem.
> 
> If my diagnosis is correct, maybe should be forwarded upstream.
> 
> Regards, Giovanni.
> -- 
> Giovanni Mascellani <g.mascell...@gmail.com>
> Pisa, Italy
> 
> Web: http://giomasce.altervista.org
> SIP: g.mascell...@ekiga.net
> Jabber: g.mascell...@jabber.org / giova...@elabor.homelinux.org
> GPG: 0x5F1FBF70 (FP: 1EB6 3D43 E201 4DDF 67BD  003F FCB0 BB5C 5F1F BF70)


diff --git a/exif-gps.cpp b/exif-gps.cpp
index 67a7ce2..ad6f762 100644
--- a/exif-gps.cpp
+++ b/exif-gps.cpp
@@ -139,8 +139,6 @@ char* ReadExifDate(char* File, int* IncludesGPS)
 		*IncludesGPS = 1;
 	}
 
-	GPSData = ExifRead["Exif.GPSInfo.GPSMapDatum"];
-
 	// Now return, passing a pointer to the date string.
 	return Copy; // Its up to the caller to free this.
 };

Attachment: signature.asc
Description: Digital signature

Reply via email to