diff options
author | Andy Green <andy@warmcat.com> | 2007-05-02 07:49:06 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-02 15:35:03 -0400 |
commit | 04c58f8196b386948abf68128605de3d2db3c6ba (patch) | |
tree | f8dc6efb0d8911ee6092830c6bbdc7910bca3d5f /scripts | |
parent | 1e093ecd4a850ad61b93d84c221e342a67ea9d56 (diff) |
kbuild: scripts/basic/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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/basic/fixdep.c | 2 |
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) | |||
249 | found: | 249 | found: |
250 | if (!memcmp(q - 7, "_MODULE", 7)) | 250 | if (!memcmp(q - 7, "_MODULE", 7)) |
251 | q -= 7; | 251 | q -= 7; |
252 | if( (q-p-7) < 0 ) | ||
253 | continue; | ||
252 | use_config(p+7, q-p-7); | 254 | use_config(p+7, q-p-7); |
253 | } | 255 | } |
254 | } | 256 | } |