This is the mail archive of the
glibc-bugs-regex@sourceware.org
mailing list for the glibc project.
[Bug regex/14780] New: [PATCH] handle malloc() and realloc() failures in regcomp()
- From: "makovick at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs-regex at sources dot redhat dot com
- Date: Sun, 28 Oct 2012 13:26:59 +0000
- Subject: [Bug regex/14780] New: [PATCH] handle malloc() and realloc() failures in regcomp()
- Auto-submitted: auto-generated
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.