gnulib/regcomp: Fix uninitialized token structure

The code is assuming that the value of br_token.constraint was
initialized to zero when it wasn't.

While some compilers will ensure that, not all do, so it is better to
fix this explicitly than leave it to chance.

Fixes: CID 73749

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Darren Kenny authored and Daniel Kiper committed 2021-03-02 15:54:16 +01:00
1 parent a983d36bd9
commit 75c3d3cec4
3 files changed
+13 -1

No files matched your search

@@ -0,0 +1,11 @@
--- a/lib/regcomp.c 2020-10-22 13:49:06.770168928 +0000
+++ b/lib/regcomp.c 2020-10-22 13:50:37.026528298 +0000
@@ -3662,7 +3662,7 @@
Idx alloc = 0;
#endif /* not RE_ENABLE_I18N */
reg_errcode_t ret;
- re_token_t br_token;
+ re_token_t br_token = {0};
bin_tree_t *tree;
sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);