projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f842eed
)
Fix a small issue with strptime
stable/1.x
author
Klaus Ethgen
<Klaus@Ethgen.de>
Sun, 28 Feb 2010 15:17:12 +0000
(15:17 +0000)
committer
Klaus Ethgen
<Klaus@Ethgen.de>
Sat, 26 May 2012 13:48:47 +0000
(14:48 +0100)
strptime do not initialize all fields. So the undefined fields could end
in crash later on.
src/exif-common.c
patch
|
blob
|
history
diff --git
a/src/exif-common.c
b/src/exif-common.c
index
84ebef5
..
f87d141
100644
(file)
--- a/
src/exif-common.c
+++ b/
src/exif-common.c
@@
-207,6
+207,7
@@
static gchar *exif_build_formatted_DateTime(ExifData *exif)
}
/* Convert the stuff into a tm struct */
+ memset(&tm, 0, sizeof(tm)); /* Uh, strptime could let garbage in tm! */
if (text && strptime(text, "%Y:%m:%d %H:%M:%S", &tm))
{
buflen = strftime(buf, sizeof(buf), "%x %X", &tm);