Commit 1ea6b241 authored by Andy Green's avatar Andy Green Committed by Chris Wright

[PATCH] kbuild: fixdep segfault on pathological string-o-death

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: default avatarAndy Green <andy@warmcat.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 1a2d9659
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment