Browse Source

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 <snakebyte@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Eric Sesterhenn 19 years ago
parent
commit
eaaae38c1a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/mod/modpost.c

+ 1 - 1
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 "