]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
net/drivers/ieee1275/ofnet: Add missing grub_malloc()
authorNicolas Frayer <nfrayer@redhat.com>
Wed, 19 Mar 2025 16:39:41 +0000 (17:39 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 26 Mar 2025 14:15:22 +0000 (15:15 +0100)
The grub_malloc() has been inadvertently removed from the code after it
has been modified to use safe math functions.

Fixes: 4beeff8a (net: Use safe math macros to prevent overflows)
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
Tested-by: Marta Lewandowska <mlewando@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/drivers/ieee1275/ofnet.c

index 3e1b9094e2ab16ef5f70b13a7b5df14256d3ae74..e5be362a91485c81c6624ad30897dea1dcd15d95 100644 (file)
@@ -463,6 +463,9 @@ search_net_devices (struct grub_ieee1275_devalias *alias)
          return 0;
        }
     }
+
+  ofdata->path = grub_malloc (sz);
+
   if (!ofdata->path)
     {
       grub_print_error ();