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/14780] New: [PATCH] handle malloc() and realloc() failures in regcomp()


http://sourceware.org/bugzilla/show_bug.cgi?id=14780

             Bug #: 14780
           Summary: [PATCH] handle malloc() and realloc() failures in
                    regcomp()
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: unassigned@sourceware.org
        ReportedBy: makovick@gmail.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Created attachment 6705
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6705
Patch for regcomp.c

Hi,

currently, regcomp() misses a lot of checks for memory allocation
failures, and it also does not properly release memory on error paths.
This means a malloc error usually causes either a SEGV or a memory
leak.

The attached patch (regex.diff) adds the return value checks and
memory deallocation on failures.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]