diff options
Diffstat (limited to 'libfetch')
-rw-r--r-- | libfetch/http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libfetch/http.c b/libfetch/http.c index 638c9a8..5a515cb 100644 --- a/libfetch/http.c +++ b/libfetch/http.c @@ -496,10 +496,10 @@ http_next_header(conn_t *conn, const char **p) static int http_parse_mtime(const char *p, time_t *mtime) { - char locale[64], *r; + char *locale, *r; struct tm tm; - strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale)); + locale = strdupa(setlocale(LC_TIME, NULL)); setlocale(LC_TIME, "C"); r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm); /* XXX should add support for date-2 and date-3 */ |