Blame SOURCES/0397-gnulib-regcomp-Fix-uninitialized-re_token.patch

468bd4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
468bd4
From: Darren Kenny <darren.kenny@oracle.com>
468bd4
Date: Tue, 24 Nov 2020 18:04:22 +0000
468bd4
Subject: [PATCH] gnulib/regcomp: Fix uninitialized re_token
468bd4
468bd4
This issue has been fixed in the latest version of gnulib, so to
468bd4
maintain consistency, I've backported that change rather than doing
468bd4
something different.
468bd4
468bd4
Fixes: CID 73828
468bd4
468bd4
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
468bd4
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
468bd4
---
468bd4
 grub-core/gnulib/regcomp.c                      |  3 +--
468bd4
 conf/Makefile.extra-dist                        |  1 +
468bd4
 grub-core/gnulib-fix-regcomp-uninit-token.patch | 12 ++++++++++++
468bd4
 3 files changed, 14 insertions(+), 2 deletions(-)
468bd4
 create mode 100644 grub-core/gnulib-fix-regcomp-uninit-token.patch
468bd4
468bd4
diff --git a/grub-core/gnulib/regcomp.c b/grub-core/gnulib/regcomp.c
f6e916
index de9f62208..6d0830ac6 100644
468bd4
--- a/grub-core/gnulib/regcomp.c
468bd4
+++ b/grub-core/gnulib/regcomp.c
468bd4
@@ -3790,8 +3790,7 @@ static bin_tree_t *
468bd4
 create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
468bd4
 	     re_token_type_t type)
468bd4
 {
468bd4
-  re_token_t t;
468bd4
-  t.type = type;
468bd4
+  re_token_t t = { .type = type };
468bd4
   return create_token_tree (dfa, left, right, &t);
468bd4
 }
468bd4
 
468bd4
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
f6e916
index edbe7846e..ee276a877 100644
468bd4
--- a/conf/Makefile.extra-dist
468bd4
+++ b/conf/Makefile.extra-dist
468bd4
@@ -32,6 +32,7 @@ EXTRA_DIST += grub-core/genemuinitheader.sh
468bd4
 
468bd4
 EXTRA_DIST += grub-core/gnulib-fix-null-deref.diff
468bd4
 EXTRA_DIST += grub-core/gnulib-fix-null-state-deref.patch
468bd4
+EXTRA_DIST += grub-core/gnulib-fix-regcomp-uninit-token.patch
468bd4
 EXTRA_DIST += grub-core/gnulib-fix-regexec-null-deref.patch
468bd4
 EXTRA_DIST += grub-core/gnulib-fix-uninit-structure.patch
468bd4
 EXTRA_DIST += grub-core/gnulib-fix-unused-value.patch
468bd4
diff --git a/grub-core/gnulib-fix-regcomp-uninit-token.patch b/grub-core/gnulib-fix-regcomp-uninit-token.patch
468bd4
new file mode 100644
f6e916
index 000000000..d61574522
468bd4
--- /dev/null
468bd4
+++ b/grub-core/gnulib-fix-regcomp-uninit-token.patch
468bd4
@@ -0,0 +1,12 @@
468bd4
+--- grub-core/gnulib/regcomp.c
468bd4
++++ grub-core/gnulib/regcomp.c
468bd4
+@@ -3808,8 +3808,7 @@ static bin_tree_t *
468bd4
+ create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
468bd4
+ 	     re_token_type_t type)
468bd4
+ {
468bd4
+-  re_token_t t;
468bd4
+-  t.type = type;
468bd4
++  re_token_t t = { .type = type };
468bd4
+   return create_token_tree (dfa, left, right, &t);
468bd4
+ }
468bd4
+