summaryrefslogtreecommitdiff
path: root/posix/regexec.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-12-27 18:19:56 -0500
committerUlrich Drepper <drepper@gmail.com>2010-12-27 18:19:56 -0500
commit2543fef229599e8a6e4feeea65ca2dd3f984154f (patch)
treeac2ed911516c1c54273899a23af4fd6b2e941b8f /posix/regexec.c
parentdb014c12695388b4e6eb608a4132a8c7b4ee74f1 (diff)
Fix infloop on persistent failing calloc in regex.
Diffstat (limited to 'posix/regexec.c')
-rw-r--r--posix/regexec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/regexec.c b/posix/regexec.c
index 7f7ae3123f..8d4475cdb9 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -3373,6 +3373,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
{
state->trtable = (re_dfastate_t **)
calloc (sizeof (re_dfastate_t *), SBC_MAX);
+ if (BE (state->trtable == NULL, 0))
+ return 0;
return 1;
}
return 0;