From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19328 invoked by alias); 30 May 2006 16:12:19 -0000 Received: (qmail 19311 invoked by uid 22791); 30 May 2006 16:12:19 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 30 May 2006 16:12:17 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k4UGC34h011820; Tue, 30 May 2006 18:12:03 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k4UGC3rq011819; Tue, 30 May 2006 18:12:03 +0200 Date: Tue, 30 May 2006 16:12:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath Cc: Glibc hackers Subject: [PATCH] Fix gaiconf_init Message-ID: <20060530161202.GB3823@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00022.txt.bz2 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 * 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