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/24844] New: regex bad pointer / leakage if malloc fails


https://sourceware.org/bugzilla/show_bug.cgi?id=24844

            Bug ID: 24844
           Summary: regex bad pointer / leakage if malloc fails
           Product: glibc
           Version: 2.29
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
          Assignee: unassigned at sourceware dot org
          Reporter: eggert at cs dot ucla.edu
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 11919
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11919&action=edit
Patch for bad pointer / leak in regex_internal.c

regex_internal.c mistreats malloc failures in a couple of places. In one, it
dereferences the resulting NULL pointer; in the other, it leaks another block
of memory when an malloc fails. The latter problem was found by Coverity.
Proposed patch attached.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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