File crash-segmentation-fault-fix.diff of Package crash

From: Sachin Sant <sachinp@in.ibm.com>
Subject: [PATCH] Fix segmentation fault
References: bnc#441818

* Executing crash without any parameter results in a segmentation fault.
* Add a NULL check for pc->orig_namelist to avoid the segmentation fault.


Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Acked-by: Bernhard Walle <bwalle@suse.de>

---
 symbols.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/symbols.c
+++ b/symbols.c
@@ -274,6 +274,9 @@ check_gnu_debuglink(bfd *bfd, int no_bfd
 		error(NOTE, "gnu_debuglink file: %s\ncrc32: %lx\n",
 			contents, crc32);
 
+	if (pc->orig_namelist == NULL)
+		return FALSE;
+
   	if ((pc->debuginfo_file = (char *)
 	    malloc(((strlen(pc->orig_namelist) + strlen("/.debug/") +
 	    + strlen(".debug") + strlen(" /usr/lib/debug/boot/ "))*10)
openSUSE Build Service is sponsored by