From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24448 invoked by alias); 29 Nov 2004 17:59:00 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 24134 invoked from network); 29 Nov 2004 17:58:50 -0000 Received: from unknown (HELO mysicka.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 29 Nov 2004 17:58:50 -0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by mysicka.ms.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id iATHwgKo032706; Mon, 29 Nov 2004 18:58:42 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id iATHwgAs032705; Mon, 29 Nov 2004 18:58:42 +0100 Date: Mon, 29 Nov 2004 17:59:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix 2 issues found by valgrind Message-ID: <20041129175841.GI8259@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 X-SW-Source: 2004-11/txt/msg00075.txt.bz2 Hi! 1) in internal_fnmatch we have is_seqval is uninitialized after we goto to normal_bracket, as we jump into the middle of is_seqval's scope, don't set it to anything and later on use it 2) tst-mktime2.c did not initialize tm.tm_isdst, yet mktime uses this Will keep looking at other problems. 2004-11-29 Jakub Jelinek * posix/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after normal_bracket label. * time/tst-mktime2.c (bigtime_test): Initialize tm.tm_isdst to -1. --- libc/posix/fnmatch_loop.c.jj 2004-09-04 09:16:57.000000000 +0200 +++ libc/posix/fnmatch_loop.c 2004-11-29 17:32:06.284085221 +0100 @@ -600,6 +600,9 @@ FCT (pattern, string, string_end, no_lea if (!is_range && c == fn) goto matched; + /* This is needed if we goto normal_bracket; from + outside of is_seqval's scope. */ + is_seqval = 0; cold = c; c = *p++; } --- libc/time/tst-mktime2.c.jj 2004-11-01 01:21:23.000000000 +0100 +++ libc/time/tst-mktime2.c 2004-11-29 15:01:24.509816991 +0100 @@ -78,6 +78,7 @@ bigtime_test (int j) struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + tm.tm_isdst = -1; now = mktime (&tm); if (now != (time_t) -1) { Jakub