From fceafeaf4450354f604551475d2351fa26e28f9e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 10 Mar 2018 16:49:41 +0100 Subject: [PATCH] tuxwetter.c: fix possible format overflow --- tuxwetter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxwetter.c b/tuxwetter.c index 413c892..60e73cd 100644 --- a/tuxwetter.c +++ b/tuxwetter.c @@ -527,7 +527,7 @@ struct tm *tltime; fcnt++; tptr++; } - sprintf(fstr,"%%0%dd",fcnt); + snprintf(fstr, sizeof(fstr), "%%0%dd", fcnt); switch(*cptr) { case 'Y': -- 2.39.5