diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-17 15:18:36 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-23 07:48:29 +0800 |
commit | 33aeb88c5bc9a0c6b1bd7190a0ead7570972b719 (patch) | |
tree | 346834a1c34672f48deb5e16c6a537633b57cb05 /posix/spawnattr_setschedpolicy.c | |
parent | f646be6ff6e4f21e68e579904362d0d110fb3f84 (diff) | |
download | glibc-master.zip glibc-master.tar.gz glibc-master.tar.bz2 |
Add valid_decimal_value to check valid decimal value in a string to
avoid uninitialized endp in add_prefixlist and gaiconf_init as reported
by Clang 19:
./getaddrinfo.c:1884:11: error: variable 'endp' is used uninitialized whenever '||' condition is true [-Werror,-Wsometimes-uninitialized]
1884 | && (cp == NULL
| ^~~~~~~~~~
./getaddrinfo.c:1887:11: note: uninitialized use occurs here
1887 | && *endp == '\0'
| ^~~~
./getaddrinfo.c:1884:11: note: remove the '||' if its condition is always false
1884 | && (cp == NULL
| ^~~~~~~~~~
1885 | || (bits = strtoul (cp, &endp, 10)) != ULONG_MAX
| ~~
./getaddrinfo.c:1875:13: note: initialize the variable 'endp' to silence this warning
1875 | char *endp;
| ^
| = NULL
This fixes BZ #32465.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'posix/spawnattr_setschedpolicy.c')
0 files changed, 0 insertions, 0 deletions