Bug 12348 - re_match_2, re_search_internal, etc. infloop on persistent failing calloc
Summary: re_match_2, re_search_internal, etc. infloop on persistent failing calloc
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: regex (show other bugs)
Version: 2.13
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-27 07:35 UTC by jim@meyering.net
Modified: 2014-06-27 14:16 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
do not cause search to infloop on calloc failure (605 bytes, patch)
2010-12-27 07:37 UTC, jim@meyering.net
Details | Diff
do not cause search to infloop on calloc failure (614 bytes, patch)
2010-12-27 07:44 UTC, jim@meyering.net
Details | Diff
do not cause search to infloop on calloc failure (617 bytes, patch)
2010-12-27 07:53 UTC, jim@meyering.net
Details | Diff
do not cause search to infloop on calloc failure (617 bytes, patch)
2010-12-27 16:36 UTC, jim@meyering.net
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jim@meyering.net 2010-12-27 07:35:42 UTC
Ignoring a failing calloc in build_trtable causes its caller, transit_state to get stuck in an infinite loop.

Patch below.
Comment 1 jim@meyering.net 2010-12-27 07:37:14 UTC
Created attachment 5166 [details]
do not cause search to infloop on calloc failure
Comment 2 jim@meyering.net 2010-12-27 07:44:01 UTC
Created attachment 5167 [details]
do not cause search to infloop on calloc failure

Adjusted git patch to have a sensible subject (i.e., not matching the bare BZ number of the first line of ChangeLog entry).
Comment 3 jim@meyering.net 2010-12-27 07:53:10 UTC
Created attachment 5168 [details]
do not cause search to infloop on calloc failure

heh. get both git log and ChangeLog entries right.
Comment 4 jim@meyering.net 2010-12-27 16:36:51 UTC
Created attachment 5170 [details]
do not cause search to infloop on calloc failure

fix
Comment 5 Ulrich Drepper 2010-12-27 23:21:40 UTC
Patch applied.