From 6362f299e44c849dc663e837e628836c09946107 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Thu, 11 Dec 1997 07:21:05 +0000 Subject: [PATCH] (GROW_FAIL_STACK): Fix test for stack size at max. --- regex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regex.c b/regex.c index 6c79ba850..7efb9346a 100644 --- a/regex.c +++ b/regex.c @@ -1205,7 +1205,8 @@ typedef struct #define FAIL_STACK_GROWTH_FACTOR 4 #define GROW_FAIL_STACK(fail_stack) \ - ((fail_stack).size >= re_max_failures * TYPICAL_FAILURE_SIZE \ + (((fail_stack).size * sizeof (fail_stack_elt_t) \ + >= re_max_failures * TYPICAL_FAILURE_SIZE) \ ? 0 \ : ((fail_stack).stack \ = (fail_stack_elt_t *) \ -- 2.11.0