Bug 138439 - re_compile_pattern segfault
re_compile_pattern segfault
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-11-09 05:27 EST by Tim Waugh
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-10 08:26:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2004-11-09 05:27:23 EST
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):

How reproducible:
Comment 1 Tim Waugh 2004-11-09 05:48:02 EST
Still segfaults after adding:

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

after the malloc line.
Comment 3 Jakub Jelinek 2004-11-10 08:26:56 EST
Fixed in glibc-2.3.3-76
Comment 4 Jakub Jelinek 2004-12-23 16:14:54 EST
Fix added to glibc-2.3.2-95.31, for the time being available from
Comment 5 Tim Powers 2005-05-18 09:59:57 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.