加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
0258-HTTP-boot-strncmp-returns-0-on-equal.patch 840 Bytes
一键复制 编辑 原始数据 按行查看 历史
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: Stephen Benjamin <stephen@redhat.com>
Date: Fri, 12 Apr 2019 10:43:13 -0400
Subject: [PATCH] HTTP boot: strncmp returns 0 on equal
Resolves: rhbz#1490991
---
grub-core/net/efi/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c
index 2a9624dac..484e0c68c 100644
--- a/grub-core/net/efi/http.c
+++ b/grub-core/net/efi/http.c
@@ -19,7 +19,7 @@ http_configure (struct grub_efi_net_device *dev, int prefer_ip6)
const char *rest, *http_server, *http_path = NULL;
http_server = grub_env_get ("root");
- https = grub_strncmp (http_server, "https", 5) ? 1 : 0;
+ https = (grub_strncmp (http_server, "https", 5) == 0) ? 1 : 0;
/* extract http server + port */
if (http_server)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化