From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bINIM-00029R-KP for mharc-grub-devel@gnu.org; Wed, 29 Jun 2016 17:45:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINII-0001uK-8J for grub-devel@gnu.org; Wed, 29 Jun 2016 17:45:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bINIE-000677-3x for grub-devel@gnu.org; Wed, 29 Jun 2016 17:45:13 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:22715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINID-000672-Qu for grub-devel@gnu.org; Wed, 29 Jun 2016 17:45:10 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5TLj8OL024142 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Jun 2016 21:45:09 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u5TLj8Tp006689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Jun 2016 21:45:08 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u5TLj6f2005452 for ; Wed, 29 Jun 2016 21:45:07 GMT Received: from ca-qasparc20.us.oracle.com (/10.147.24.73) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 29 Jun 2016 14:45:05 -0700 From: Eric Snowberg To: grub-devel@gnu.org Cc: Eric Snowberg Subject: [PATCH 05/15] ieee1275: fix segfault in grub-ofpathname Date: Wed, 29 Jun 2016 14:43:18 -0700 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 21:45:17 -0000 fix segfault in grub-ofpathname Signed-off-by: Eric Snowberg --- util/ieee1275/grub-ofpathname.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/util/ieee1275/grub-ofpathname.c b/util/ieee1275/grub-ofpathname.c index 8e5d766..300fbdd 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); -- 1.7.1