This is the mail archive of the
glibc-bugs-regex@sourceware.org
mailing list for the glibc project.
[Bug regex/5718] New: Uninitialised struct member in re_compile_internal causes crash in regfree
- From: "rrt at sc3d dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs-regex at sources dot redhat dot com
- Date: 4 Feb 2008 13:21:54 -0000
- Subject: [Bug regex/5718] New: Uninitialised struct member in re_compile_internal causes crash in regfree
- Reply-to: sourceware-bugzilla at sourceware dot org
regfree frees preg->translate (regcomp.c:629), but if the GNU API was used to
initialise the pattern buffer, then translate has not been initialised, so may
well contain a bogus value.
Fix is to initialise it to NULL in re_compile_internal (say, just after
regcomp.c:724), and best workaround I can think of is to make sure that you zero
the re_pattern_buffer when allocating it.
--
Summary: Uninitialised struct member in re_compile_internal
causes crash in regfree
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: regex
AssignedTo: drepper at redhat dot com
ReportedBy: rrt at sc3d dot org
CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5718
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.