]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output: fix long logline test
authorVictor Julien <vjulien@oisf.net>
Sat, 11 Oct 2025 18:06:24 +0000 (20:06 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 15 Oct 2025 19:42:54 +0000 (21:42 +0200)
Fixes: 023a2fe9ab1f ("unittests: fix format-truncation warning")
(cherry picked from commit b7650a45fa935d9b204490eceac98a535663b8ff)

src/util-debug.c

index 3bd3a3bed41f4cc95199f4dd2f99b63944099db2..c0e61f6ba72212681dfcd0b3cc17dd4aa578abf7 100644 (file)
@@ -1791,6 +1791,7 @@ static int SCLogTestInit05(void)
 {
     char str[4096];
     memset(str, 'A', sizeof(str));
+    str[sizeof(str) - 1] = '\0';
     SCLogInfo("%s", str);
 
     PASS;