This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/5718] Uninitialised struct member in re_compile_internal causes crash in regfree


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]