1 Star 0 Fork 50

Meredith/grub2

forked from src-anolis-os/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0397-gnulib-regcomp-Fix-uninitialized-re_token.patch 2.34 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:15 . update to grub2-2.02-120.el8.src.rpm
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Darren Kenny <darren.kenny@oracle.com>
Date: Tue, 24 Nov 2020 18:04:22 +0000
Subject: [PATCH] gnulib/regcomp: Fix uninitialized re_token
This issue has been fixed in the latest version of gnulib, so to
maintain consistency, I've backported that change rather than doing
something different.
Fixes: CID 73828
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/gnulib/regcomp.c | 3 +--
conf/Makefile.extra-dist | 1 +
grub-core/gnulib-fix-regcomp-uninit-token.patch | 12 ++++++++++++
3 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 grub-core/gnulib-fix-regcomp-uninit-token.patch
diff --git a/grub-core/gnulib/regcomp.c b/grub-core/gnulib/regcomp.c
index de9f62208..6d0830ac6 100644
--- a/grub-core/gnulib/regcomp.c
+++ b/grub-core/gnulib/regcomp.c
@@ -3790,8 +3790,7 @@ static bin_tree_t *
create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
re_token_type_t type)
{
- re_token_t t;
- t.type = type;
+ re_token_t t = { .type = type };
return create_token_tree (dfa, left, right, &t);
}
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
index edbe7846e..ee276a877 100644
--- a/conf/Makefile.extra-dist
+++ b/conf/Makefile.extra-dist
@@ -32,6 +32,7 @@ EXTRA_DIST += grub-core/genemuinitheader.sh
EXTRA_DIST += grub-core/gnulib-fix-null-deref.diff
EXTRA_DIST += grub-core/gnulib-fix-null-state-deref.patch
+EXTRA_DIST += grub-core/gnulib-fix-regcomp-uninit-token.patch
EXTRA_DIST += grub-core/gnulib-fix-regexec-null-deref.patch
EXTRA_DIST += grub-core/gnulib-fix-uninit-structure.patch
EXTRA_DIST += grub-core/gnulib-fix-unused-value.patch
diff --git a/grub-core/gnulib-fix-regcomp-uninit-token.patch b/grub-core/gnulib-fix-regcomp-uninit-token.patch
new file mode 100644
index 000000000..d61574522
--- /dev/null
+++ b/grub-core/gnulib-fix-regcomp-uninit-token.patch
@@ -0,0 +1,12 @@
+--- grub-core/gnulib/regcomp.c
++++ grub-core/gnulib/regcomp.c
+@@ -3808,8 +3808,7 @@ static bin_tree_t *
+ create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+ re_token_type_t type)
+ {
+- re_token_t t;
+- t.type = type;
++ re_token_t t = { .type = type };
+ return create_token_tree (dfa, left, right, &t);
+ }
+
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yueeranna/grub2.git
git@gitee.com:yueeranna/grub2.git
yueeranna
grub2
grub2
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385