]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - index.c
Fix several possible sprintf buffer overflows
[thirdparty/sarg.git] / index.c
diff --git a/index.c b/index.c
index 86a2a7a6b898eb7b3990bc0ee5e986fd688d0ff3..64d9f646345efdbe1c0f87cbb35d1cc56b0ed504 100644 (file)
--- a/index.c
+++ b/index.c
@@ -395,7 +395,7 @@ static void make_file_index(void)
                                debuga(_("Maybe you have a broken time in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
                                exit(EXIT_FAILURE);
                        }
-                       buildymd(day,mon,year,ftime);
+                       buildymd(day,mon,year,ftime,sizeof(ftime));
                        snprintf(item->creationdate,sizeof(item->creationdate),"%s%02d%02d%02d",ftime, ihour, iminute, isecond);
                }
                item->dirname=strdup(direntp->d_name);