Blame SOURCES/0258-HTTP-boot-strncmp-returns-0-on-equal.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Stephen Benjamin <stephen@redhat.com>
8631a2
Date: Fri, 12 Apr 2019 10:43:13 -0400
8631a2
Subject: [PATCH] HTTP boot: strncmp returns 0 on equal
8631a2
8631a2
Resolves: rhbz#1490991
8631a2
---
8631a2
 grub-core/net/efi/http.c | 2 +-
8631a2
 1 file changed, 1 insertion(+), 1 deletion(-)
8631a2
8631a2
diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c
09e3cc
index 2a9624dac..484e0c68c 100644
8631a2
--- a/grub-core/net/efi/http.c
8631a2
+++ b/grub-core/net/efi/http.c
8631a2
@@ -19,7 +19,7 @@ http_configure (struct grub_efi_net_device *dev, int prefer_ip6)
8631a2
   const char *rest, *http_server, *http_path = NULL;
8631a2
 
8631a2
   http_server = grub_env_get ("root");
8631a2
-  https = grub_strncmp (http_server, "https", 5) ? 1 : 0;
8631a2
+  https = (grub_strncmp (http_server, "https", 5) == 0) ? 1 : 0;
8631a2
 
8631a2
   /* extract http server + port */
8631a2
   if (http_server)