This is the mail archive of the glibc-bugs-regex@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] New: Uninitialised struct member in re_compile_internal causes crash in regfree


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.


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