lib/fetch/http.c: buffer not NUL terminated (CID 62666)
This commit is contained in:
parent
691cd26482
commit
9d90c75fcc
@ -519,7 +519,8 @@ http_parse_mtime(const char *p, time_t *mtime)
|
||||
char locale[64], *r;
|
||||
struct tm tm;
|
||||
|
||||
strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale));
|
||||
strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale)-1);
|
||||
locale[sizeof(locale)-1] = '\0';
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user