Mercurial > hg > forks > geeqie
changeset 2009:d812280fcc6b stable/1.x
Fix a small issue with strptime
strptime do not initialize all fields. So the undefined fields could end
in crash later on.
author | Klaus Ethgen <Klaus@Ethgen.de> |
---|---|
date | Sun, 28 Feb 2010 15:17:12 +0000 |
parents | 4bd5a199d369 |
children | |
files | src/exif-common.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/exif-common.c Sat Feb 27 20:34:54 2010 +0000 +++ b/src/exif-common.c Sun Feb 28 15:17:12 2010 +0000 @@ -207,6 +207,7 @@ } /* 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);