diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c index d0882e27308b..48c0e7e3de17 100644 --- a/net/libfetch/files/http.c +++ b/net/libfetch/files/http.c @@ -529,7 +529,7 @@ http_parse_mtime(const char *p, time_t *mtime) char locale[64], *r; struct tm tm; - strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale)); + strlcpy(locale, setlocale(LC_TIME, NULL), sizeof(locale)); 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 */