summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2007-05-02 21:48:37 +0200
committerChris Wright <chrisw@sous-sol.org>2007-05-23 14:32:42 -0700
commit1ea6b2418cd2c6a6f31067ed6ece5cd12c69351e (patch)
treeef0c5012cf7fe4effd140c08698cfcf9ec63157a /scripts
parent1a2d9659b8e34589df00698fbd0fa5819fa59994 (diff)
[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: Andy Green <andy@warmcat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic/fixdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 6bc7e7cfccf6..8912c0f5460b 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -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);
}
}