From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18564 invoked by alias); 28 Oct 2012 13:27:14 -0000 Received: (qmail 18513 invoked by uid 48); 28 Oct 2012 13:27:01 -0000 From: "makovick at gmail dot com" To: glibc-bugs-regex@sources.redhat.com Subject: [Bug regex/14780] New: [PATCH] handle malloc() and realloc() failures in regcomp() Date: Sun, 28 Oct 2012 13:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: regex X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: makovick at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-regex-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-regex-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00000.txt.bz2 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.