Permalink
Browse files

zsync.c: in parse_822, strptime will not initialize tm_isdst, so set …

…it to -1
  • Loading branch information...
1 parent 008f417 commit 5556dee92a16aa0586d4046c03a3bd86545970d2 merlino committed with Jan 5, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 c/libzsync/zsync.c
View
@@ -376,6 +376,9 @@ static int zsync_read_blocksums(struct zsync_state *zs, FILE * f,
static time_t parse_822(const char* ts) {
struct tm t;
+ /* strptime will not initialize isdst */
+ t.tm_isdst = -1;
+
if (strptime(ts, "%a, %d %b %Y %H:%M:%S %z", &t) == NULL
&& strptime(ts, "%d %b %Y %H:%M:%S %z", &t) == NULL) {
return -1;

0 comments on commit 5556dee

Please sign in to comment.