Bug 141441

Summary: fnmatch uses uninitialized variable
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-06 07:57:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description John Reiser 2004-12-01 04:42:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
The test program posix/tst-fnmatch uses an uninitialized variable for
test 307 in posix/tst-fnmatch.input:
C               "\\"                    "[\\\\-a]"             0
and the error lies in internal_fnmatch (in /lib/tls/libc-2.3.3.so).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. valgrind --tool=memcheck tst-fnmatch <bug.input
C               "\\"                    "[\\\\-a]"             0

Actual Results:  ==1974== Memcheck, a memory error detector for x86-linux.
==1974== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==1974== Using valgrind-2.2.0, a program supervision framework for
==1974== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==1974== For more details, rerun with: -v
==1974== Conditional jump or move depends on uninitialised value(s)
==1974==    at 0xB84B1A: internal_fnmatch (in /lib/tls/libc-2.3.3.so)
==1974==    by 0xB87E8F: fnmatch@@GLIBC_2.2.3 (in /lib/tls/libc-2.3.3.so)
==1974==    by 0x8048F8D: main (tst-fnmatch.c:129)
  1: fnmatch ("[\\\\-a]", "\\", 0) = 0
  1 tests,   0 failed

Expected Results:  No complaint from memcheck.

Additional info:

Comment 2 Jakub Jelinek 2004-12-06 07:57:28 UTC
That change is in glibc-2.3.3-86 and above.