public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/5718] New: Uninitialised struct member in re_compile_internal causes crash in regfree
@ 2008-02-04 13:22 rrt at sc3d dot org
  2008-02-04 13:37 ` [Bug regex/5718] " rrt at sc3d dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: rrt at sc3d dot org @ 2008-02-04 13:22 UTC (permalink / raw)
  To: glibc-bugs-regex

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-5718-132@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2014-07-02  7:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-04 13:22 [Bug regex/5718] New: Uninitialised struct member in re_compile_internal causes crash in regfree rrt at sc3d dot org
2008-02-04 13:37 ` [Bug regex/5718] " rrt at sc3d dot org
2008-02-04 13:56 ` bonzini at gnu dot org
2008-02-04 14:04 ` rrt at sc3d dot org
2008-02-04 14:11 ` jakub at redhat dot com
     [not found] <bug-5718-132@http.sourceware.org/bugzilla/>
2014-07-02  7:43 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).