diff options
author | Will Newton <will.newton@gmail.com> | 2010-09-22 10:59:13 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-10-04 09:40:04 -0400 |
commit | 1408b15b98635a13bad2e2a50b3c2ae2ccdf625b (patch) | |
tree | 148e0f0b0a9a3092b2134dde73490b73d317f767 /scripts | |
parent | 19c29f326075e2c66e34d98f2a0cf22901b2d8e9 (diff) |
kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
This prevents the buffers being overflowed when using a config
file with a long name. PATH_MAX is used elsewhere in the same
file, so use it here as well.
Signed-off-by: Will Newton <will.newton@imgtec.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/confdata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 35c08ecaad17..96110ea41cf3 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -535,7 +535,7 @@ int conf_write(const char *name) | |||
535 | struct menu *menu; | 535 | struct menu *menu; |
536 | const char *basename; | 536 | const char *basename; |
537 | const char *str; | 537 | const char *str; |
538 | char dirname[128], tmpname[128], newname[128]; | 538 | char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; |
539 | enum symbol_type type; | 539 | enum symbol_type type; |
540 | time_t now; | 540 | time_t now; |
541 | int use_timestamp = 1; | 541 | int use_timestamp = 1; |
@@ -654,7 +654,7 @@ next: | |||
654 | static int conf_split_config(void) | 654 | static int conf_split_config(void) |
655 | { | 655 | { |
656 | const char *name; | 656 | const char *name; |
657 | char path[128]; | 657 | char path[PATH_MAX+1]; |
658 | char *s, *d, c; | 658 | char *s, *d, c; |
659 | struct symbol *sym; | 659 | struct symbol *sym; |
660 | struct stat sb; | 660 | struct stat sb; |