From: Eric Sesterhenn Date: Mon, 10 Apr 2006 22:54:16 +0000 (+0200) Subject: kbuild: fix NULL dereference in scripts/mod/modpost.c X-Git-Tag: v2.6.17-rc2~98^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaaae38c1ac4ccbec6d2de7255b0538f38fb29d6;p=linux-2.6 kbuild: fix NULL dereference in scripts/mod/modpost.c before is NULL in this case, concluding from the surrounding code it seems that after is the right one to use. Signed-off-by: Eric Sesterhenn Signed-off-by: Sam Ravnborg --- diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0b92ddff26..7e8079a34a 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -658,7 +658,7 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, warn("%s - Section mismatch: reference to %s:%s from %s " "before '%s' (at offset -0x%llx)\n", modname, secname, refsymname, fromsec, - elf->strtab + before->st_name, + elf->strtab + after->st_name, (long long)r.r_offset); } else { warn("%s - Section mismatch: reference to %s:%s from %s "