Skip to content

Commit

Permalink
kbuild: scripts/basic/fixdep segfault on pathological string-o-death
Browse files Browse the repository at this point in the history
build scripts: fixdep blows segfault on string CONFIG_MODULE seen

The string "CONFIG_MODULE" appearing anywhere in a source file causes
fixdep to segfault.  This string appeared in the wild in the current
mISDN sources (I think they meant CONFIG_MODULES).  But it shouldn't
segfault (esp as CONFIG_MODULE appeared in a quoted string).

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Andy Green authored and Sam Ravnborg committed May 2, 2007
1 parent 1e093ec commit 04c58f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/basic/fixdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ void parse_config_file(char *map, size_t len)
found:
if (!memcmp(q - 7, "_MODULE", 7))
q -= 7;
if( (q-p-7) < 0 )
continue;
use_config(p+7, q-p-7);
}
}
Expand Down

0 comments on commit 04c58f8

Please sign in to comment.