Bug 138439

Summary: re_compile_pattern segfault
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-10 13:26:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Waugh 2004-11-09 10:27:23 UTC
Description of problem:
This program segfaults:

#include <regex.h>
#include <stdlib.h>
int main ()
{
        struct re_pattern_buffer *buf;
        buf = malloc (sizeof (struct re_pattern_buffer));
        re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
        return !!re_compile_pattern ("\\(\\b\\)\\{0\\}", 11, buf);
}

Version-Release number of selected component (if applicable):
glibc-2.3.3-74

How reproducible:
100%

Comment 1 Tim Waugh 2004-11-09 10:48:02 UTC
Still segfaults after adding:

memset (buf, 0, sizeof (*buf));

after the malloc line.

Comment 3 Jakub Jelinek 2004-11-10 13:26:56 UTC
Fixed in glibc-2.3.3-76

Comment 4 Jakub Jelinek 2004-12-23 21:14:54 UTC
Fix added to glibc-2.3.2-95.31, for the time being available from
ftp://people.redhat.com/jakub/glibc/2.3.2-95.31/


Comment 5 Tim Powers 2005-05-18 13:59:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-256.html