From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, Roland McGrath <roland@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix gaiconf_init
Date: Tue, 30 May 2006 16:12:00 -0000 [thread overview]
Message-ID: <20060530161202.GB3823@sunsite.mff.cuni.cz> (raw)
Hi!
If precedence has no / in val1 string, bits will be uninitialized,
as goto new_elem will jump into the block after bits initialization.
2006-05-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/posix/getaddrinfo.c (gaiconf_init): Initialize bits
to 128 after new_elem label.
--- libc/sysdeps/posix/getaddrinfo.c.jj 2006-05-29 16:28:08.000000000 +0200
+++ libc/sysdeps/posix/getaddrinfo.c 2006-05-30 18:05:35.000000000 +0200
@@ -1668,7 +1668,7 @@ gaiconf_init (void)
if (strcmp (cmd, "label") == 0)
{
struct in6_addr prefix;
- unsigned long int bits = 128;
+ unsigned long int bits;
unsigned long int val;
char *endp;
@@ -1677,6 +1677,7 @@ gaiconf_init (void)
nullbitsp = &labellist_nullbits;
new_elem:
+ bits = 128;
__set_errno (0);
cp = strchr (val1, '/');
if (cp != NULL)
Jakub
reply other threads:[~2006-05-30 16:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060530161202.GB3823@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).