regex-emacs: copy less when reallocating
* src/regex-emacs.c (GROW_FAIL_STACK): Copy just the occupied stack slots, as the rest are garbage.
This commit is contained in:
parent
bd5771ff27
commit
e823709d17
1 changed files with 1 additions and 1 deletions
|
@ -929,7 +929,7 @@ typedef struct
|
|||
? 0 \
|
||||
: ((fail_stack).stack \
|
||||
= REGEX_REALLOCATE ((fail_stack).stack, \
|
||||
(fail_stack).size * sizeof (fail_stack_elt_t), \
|
||||
(fail_stack).avail * sizeof (fail_stack_elt_t), \
|
||||
min (emacs_re_max_failures * TYPICAL_FAILURE_SIZE, \
|
||||
((fail_stack).size * FAIL_STACK_GROWTH_FACTOR)) \
|
||||
* sizeof (fail_stack_elt_t)), \
|
||||
|
|
Loading…
Add table
Reference in a new issue