From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1684 invoked by alias); 6 Sep 2006 16:41:03 -0000 Received: (qmail 1665 invoked by uid 22791); 6 Sep 2006 16:41:02 -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; Wed, 06 Sep 2006 16:41:01 +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 k86GeqSL030384; Wed, 6 Sep 2006 18:40:52 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k86GepB0030380; Wed, 6 Sep 2006 18:40:51 +0200 Date: Wed, 06 Sep 2006 16:41:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix uninitialized vars in ld-collate.c Message-ID: <20060906164051.GV4556@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-09/txt/msg00007.txt.bz2 Hi! col_sym_free label is in a different block and frees what local variables in that block point to, guess that's a typo. seqp was declared in 2 different blocks and one was in some cases using goto to jump to the other block. 2006-09-06 Jakub Jelinek * locale/programs/ld-collate.c (collate_read): Goto sym_equiv_free rather than col_sym_free. Move seqp declaration earlier. --- libc/locale/programs/ld-collate.c.jj 2006-08-30 17:20:41.000000000 +0200 +++ libc/locale/programs/ld-collate.c 2006-09-06 18:33:31.000000000 +0200 @@ -3068,7 +3068,7 @@ collate_read (struct linereader *ldfile, lr_error (ldfile, _("\ %s: unknown symbol `%s' in equivalent definition"), "LC_COLLATE", symname); - goto col_sym_free; + goto sym_equiv_free; } if (insert_entry (&collate->sym_table, @@ -3533,13 +3533,13 @@ error while adding equivalent collating break; } + struct element_t *seqp; if (state == 0) { /* We are outside an `order_start' region. This means we must only accept definitions of values for collation symbols since these are purely abstract values and don't need directions associated. */ - struct element_t *seqp; void *ptr; if (find_entry (&collate->seq_table, symstr, symlen, &ptr) == 0) @@ -3586,7 +3586,6 @@ error while adding equivalent collating { /* It is possible that we already have this collation sequence. In this case we move the entry. */ - struct element_t *seqp = NULL; void *sym; void *ptr; Jakub