nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0136-Fix-const-char-pointers-in-grub-core-net-bootp.c.patch

8e15ce
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8e15ce
From: Peter Jones <pjones@redhat.com>
8e15ce
Date: Mon, 20 Jul 2020 12:24:02 -0400
8e15ce
Subject: [PATCH] Fix const char ** pointers in grub-core/net/bootp.c
8e15ce
8e15ce
This will need to get folded back in the right place on the next rebase,
8e15ce
but it's before "Make grub_strtol() "end" pointers have safer const
8e15ce
qualifiers" currently, so for now I'm leaving it here instead of merging
8e15ce
it back with the original patch.
8e15ce
8e15ce
Signed-off-by: Peter Jones <pjones@redhat.com>
8e15ce
---
8e15ce
 grub-core/net/bootp.c | 4 ++--
8e15ce
 1 file changed, 2 insertions(+), 2 deletions(-)
8e15ce
8e15ce
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
b35c50
index 8fb8918ae7..7baf3540c8 100644
8e15ce
--- a/grub-core/net/bootp.c
8e15ce
+++ b/grub-core/net/bootp.c
8e15ce
@@ -329,7 +329,7 @@ grub_net_configure_by_dhcp_ack (const char *name,
8e15ce
   struct grub_net_network_level_interface *inter;
8e15ce
   int mask = -1;
8e15ce
   char server_ip[sizeof ("xxx.xxx.xxx.xxx")];
8e15ce
-  const grub_uint8_t *opt;
8e15ce
+  const char *opt;
8e15ce
   grub_uint8_t opt_len, overload = 0;
8e15ce
   const char *boot_file = 0, *server_name = 0;
8e15ce
   grub_size_t boot_file_len, server_name_len;
8e15ce
@@ -505,7 +505,7 @@ grub_net_configure_by_dhcp_ack (const char *name,
8e15ce
   if (opt && opt_len)
8e15ce
     {
8e15ce
       grub_env_set_net_property (name, "vendor_class_identifier", (const char *) opt, opt_len);
8e15ce
-      if (opt && grub_strcmp (opt, "HTTPClient") == 0)
8e15ce
+      if (opt && grub_strcmp ((char *)opt, "HTTPClient") == 0)
8e15ce
         {
8e15ce
           char *proto, *ip, *pa;
8e15ce