grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH resend] ieee1275: fix segfault in grub-ofpathname


From: Eric Snowberg
Subject: [PATCH resend] ieee1275: fix segfault in grub-ofpathname
Date: Tue, 28 Nov 2017 11:51:39 -0800

fix segfault in grub-ofpathname

Signed-off-by: Eric Snowberg <address@hidden>
---
Originally sent on Wed, 29 Jun 2016 14:43:18 -0700
http://lists.gnu.org/archive/html/grub-devel/2016-06/msg00033.html
---
 util/ieee1275/grub-ofpathname.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/util/ieee1275/grub-ofpathname.c b/util/ieee1275/grub-ofpathname.c
index 8e5d766cb..300fbddad 100644
--- a/util/ieee1275/grub-ofpathname.c
+++ b/util/ieee1275/grub-ofpathname.c
@@ -46,7 +46,9 @@ int main(int argc, char **argv)
     }
 
   of_path = grub_util_devname_to_ofpath (argv[1]);
-  printf("%s\n", of_path);
+
+  if (of_path)
+    printf ("%s\n", of_path);
 
   free (of_path);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]