2018-07-12 14:56:34 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-07-10 19:08:14 +00:00
|
|
|
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);
|
|
|
|
|