]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
vasnprintf-extra-tests: Fix test bug.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Jul 2026 17:04:20 +0000 (19:04 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Jul 2026 17:04:20 +0000 (19:04 +0200)
* tests/test-vasnprintf-big.c (main): Properly NUL-terminate the second
string.

ChangeLog
tests/test-vasnprintf-big.c

index f78d9a2706496f0cf39861a915c9dd1d9b34c359..0ddd38c4efa61788b68ed642064b19f9b4a81ddf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-07-14  Bruno Haible  <bruno@clisp.org>
+
+       vasnprintf-extra-tests: Fix test bug.
+       * tests/test-vasnprintf-big.c (main): Properly NUL-terminate the second
+       string.
+
 2026-07-14  Bruno Haible  <bruno@clisp.org>
 
        vasnprintf, vasnwprintf: Revisit THOUSEP_MAXLEN.
index a9969e18c7dbf8f8bdc17cc5d74a4627f8adfa4c..1ff043a1056953c1445d021f56ec79cac893c342 100644 (file)
@@ -110,7 +110,7 @@ main ()
             if (s2 != NULL)
               {
                 memset (s2, 'b', n2);
-                s1[n1] = '\0';
+                s2[n2] = '\0';
 
                 size_t len;
                 char *s = asnprintf (NULL, &len, "x%sy%sz", s1, s2);