From 2543fef229599e8a6e4feeea65ca2dd3f984154f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 27 Dec 2010 18:19:56 -0500 Subject: Fix infloop on persistent failing calloc in regex. --- posix/regexec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'posix/regexec.c') 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; -- cgit v1.2.3