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

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