grub2/0092-ieee1275-Fix-segfault-in-grub-ofpathname.patch
Peter Jones 752ceb1640 Rebased to newer upstream for fedora-29
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 15:12:02 -04:00

27 lines
823 B
Diff

From 2dc163bf692c18275de7b0d6716138c676e3bf92 Mon Sep 17 00:00:00 2001
From: Eric Snowberg <eric.snowberg@oracle.com>
Date: Tue, 28 Nov 2017 11:51:39 -0800
Subject: [PATCH] ieee1275: Fix segfault in grub-ofpathname
Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
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 8e5d766cb63..300fbddad7c 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);