This is the mail archive of the
glibc-bugs-regex@sourceware.org
mailing list for the glibc project.
[Bug regex/5718] 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:37:00 -0000
- Subject: [Bug regex/5718] Uninitialised struct member in re_compile_internal causes crash in regfree
- References: <20080204132153.5718.rrt@sc3d.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rrt at sc3d dot org 2008-02-04 13:37 -------
In fact, the bug is slightly trickier than I thought: GNU regexs do use the
translate field, but allow it to be initialised manually, therefore it need not
actually point to malloced memory, so regfree shouldn't be trying to free it
when the buffer in question is a GNU regex.
The workaround is therefore to zero the translate field before calling regfree
if it is not either NULL or a pointer to malloced memory, but I'm not sure what
the fix is.
--
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.