1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
Description: fix segfault when failing to mmap SMBIOS tables as a daemon
mcelog segfaults when it is run as a daemon and cannot mmap the SMBIOS
tables because the entries variables is not reset to NULL after the
error.
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=585853
Bug-Debian: http://bugs.debian.org/585853
Index: mcelog-1.0~pre3-72-gcbd4da4/dmi.c
===================================================================
--- mcelog-1.0~pre3-72-gcbd4da4.orig/dmi.c 2011-07-20 18:44:29.989434047 +0200
+++ mcelog-1.0~pre3-72-gcbd4da4/dmi.c 2011-07-20 18:44:33.865401045 +0200
@@ -266,6 +266,7 @@
round_down(a->table, pagesize));
if (entries == (struct dmi_entry *)-1) {
Eprintf("Cannot mmap SMBIOS tables at %x", a->table);
+ entries = NULL;
goto out_mmap;
}
entries = (struct dmi_entry *)(((char *)entries) + corr);
|