diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2010-11-07 19:52:13 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-11-07 19:52:13 +0100 |
commit | 937367785a568d1b683b1e31b8ad9bdbe0cb607b (patch) | |
tree | 33c23e37cfcd264c0e88a9b1b78c0e0dfaf7fc2c /package/config/confdata.c | |
parent | 24c9f8ca706e57dc3ccfd908c54961fb67bd3854 (diff) | |
download | buildroot-novena-937367785a568d1b683b1e31b8ad9bdbe0cb607b.tar.gz buildroot-novena-937367785a568d1b683b1e31b8ad9bdbe0cb607b.zip |
config: fix crash with too long paths
Closes #2737
Use PATH_MAX rather that 128 for path buffers. Patch from kernel 1408b15b98
(kconfig: Use PATH_MAX instead of 128 for path buffer sizes) by Will Newton.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/config/confdata.c')
-rw-r--r-- | package/config/confdata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/config/confdata.c b/package/config/confdata.c index 5cfb6d23a..1b1fdb7b9 100644 --- a/package/config/confdata.c +++ b/package/config/confdata.c @@ -534,7 +534,7 @@ int conf_write(const char *name) struct menu *menu; const char *basename; const char *str; - char dirname[128], tmpname[128], newname[128]; + char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; enum symbol_type type; time_t now; int use_timestamp = 1; @@ -658,7 +658,7 @@ next: static int conf_split_config(void) { const char *name; - char path[128]; + char path[PATH_MAX+1]; char *opwd, *dir, *_name; char *s, *d, c; struct symbol *sym; |