[PATCH] Fix segmentation fault

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

 



* 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@xxxxxxxxxx>
Acked-by: Bernhard Walle <bwalle@xxxxxxx>


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


* 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@xxxxxxxxxx>
Acked-by: Bernhard Walle <bwalle@xxxxxxx>

diff --git a/symbols.c b/symbols.c
--- a/symbols.c
+++ b/symbols.c
@@ -266,6 +266,9 @@
 		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->namelist) + strlen("/.debug/") +
 	    + strlen(".debug") + strlen(" /usr/lib/debug/boot/ "))*10)
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux