projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
69b6794
)
Bug fix: Compute TimeZone data
author
Colin Clark
<colin.clark@cclark.uk>
Thu, 25 Jul 2019 08:25:28 +0000
(09:25 +0100)
committer
Klaus Ethgen
<Klaus@Ethgen.de>
Fri, 26 Jul 2019 17:54:44 +0000
(18:54 +0100)
Improved error detection
src/exif-common.c
patch
|
blob
|
history
diff --git
a/src/exif-common.c
b/src/exif-common.c
index
fd2c6a3
..
ce90d73
100644
(file)
--- a/
src/exif-common.c
+++ b/
src/exif-common.c
@@
-703,6
+703,10
@@
static gboolean exif_build_tz_data(ExifData *exif, gchar **exif_date_time, gchar
{
lat_deg = strtok(text_latitude, "deg'");
lat_min = strtok(NULL, "deg'");
+ if (!lat_deg || !lat_min)
+ {
+ return FALSE;
+ }
latitude = atof(lat_deg) + atof(lat_min) / 60;
if (!g_strcmp0(text_latitude_ref, "South"))
{
@@
-710,6
+714,10
@@
static gboolean exif_build_tz_data(ExifData *exif, gchar **exif_date_time, gchar
}
lon_deg = strtok(text_longitude, "deg'");
lon_min = strtok(NULL, "deg'");
+ if (!lon_deg || !lon_min)
+ {
+ return FALSE;
+ }
longitude = atof(lon_deg) + atof(lon_min) / 60;
if (!g_strcmp0(text_longitude_ref, "West"))
{