From: Collin Funk Date: Wed, 28 May 2025 14:50:33 +0000 (-0700) Subject: vasnprintf: Fix uninitialized values. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4153ff14c21d46a7cdad4ba9e8e8b673d4040fb;p=thirdparty%2Fgnulib.git vasnprintf: Fix uninitialized values. * lib/vasnprintf.c (VASNPRINFT): Initialize all occurrences of thousep_len to zero. --- diff --git a/ChangeLog b/ChangeLog index fb13633936..cb84a5856e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-05-28 Collin Funk + + vasnprintf: Fix uninitialized values. + * lib/vasnprintf.c (VASNPRINFT): Initialize all occurrences of + thousep_len to zero. + 2025-05-28 Bruno Haible gettext-h: Avoid gcc -Wformat-security warnings with --disable-nls. diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index a5a956603a..f46e8701bd 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -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;