]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
vasnprintf: Fix uninitialized values.
authorCollin Funk <collin.funk1@gmail.com>
Wed, 28 May 2025 14:50:33 +0000 (07:50 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Wed, 28 May 2025 14:50:33 +0000 (07:50 -0700)
* lib/vasnprintf.c (VASNPRINFT): Initialize all occurrences of
thousep_len to zero.

ChangeLog
lib/vasnprintf.c

index fb136339367c97a4e8291ef583ce62f0f4c334a1..cb84a5856eb9157e91760568ece1dbe1321e3d3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-05-28  Collin Funk  <collin.funk1@gmail.com>
+
+       vasnprintf: Fix uninitialized values.
+       * lib/vasnprintf.c (VASNPRINFT): Initialize all occurrences of
+       thousep_len to zero.
+
 2025-05-28  Bruno Haible  <bruno@clisp.org>
 
        gettext-h: Avoid gcc -Wformat-security warnings with --disable-nls.
index a5a956603a0fa7f967fe152ee494276161b7f7a2..f46e8701bde1e90e1b810efc22dd483af7bcb2ef 100644 (file)
@@ -5249,7 +5249,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                     const DCHAR_T *thousep = NULL;
                                     DCHAR_T thousep_buf[10];
 #   if !WIDE_CHAR_VERSION
-                                    size_t thousep_len;
+                                    size_t thousep_len = 0;
 #   endif
                                     const signed char *grouping;
                                     size_t insert = 0;
@@ -5579,7 +5579,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                             const DCHAR_T *thousep = NULL;
                                             DCHAR_T thousep_buf[10];
 #   if !WIDE_CHAR_VERSION
-                                            size_t thousep_len;
+                                            size_t thousep_len = 0;
 #   endif
                                             const signed char *grouping;
                                             size_t insert = 0;
@@ -5857,7 +5857,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                     const DCHAR_T *thousep = NULL;
                                     DCHAR_T thousep_buf[10];
 #   if !WIDE_CHAR_VERSION
-                                    size_t thousep_len;
+                                    size_t thousep_len = 0;
 #   endif
                                     const signed char *grouping;
                                     size_t insert = 0;
@@ -6195,7 +6195,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                             const DCHAR_T *thousep = NULL;
                                             DCHAR_T thousep_buf[10];
 #   if !WIDE_CHAR_VERSION
-                                            size_t thousep_len;
+                                            size_t thousep_len = 0;
 #   endif
                                             const signed char *grouping;
                                             size_t insert = 0;