Skip to content

Commit

Permalink
Ensure that the saved TZ is actually 0 terminated
Browse files Browse the repository at this point in the history
Valgrind caught this by marking it as an uninitialized jump, because
strcmp was used later on.
  • Loading branch information
dbussink committed Mar 27, 2013
1 parent 5095abc commit b035496
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vm/util/strftime.c
Expand Up @@ -215,6 +215,7 @@ strftime_extended(char *s, size_t maxsize, const char *format, const struct tm64
if (savetz != NULL) {
savetzlen = tzlen + 1;
strncpy(savetz, tz, tzlen);
savetz[tzlen] = 0;
}
}
tzset();
Expand Down

0 comments on commit b035496

Please sign in to comment.