diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-15 12:06:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-15 12:06:14 -0400 |
| commit | 2bbacd1a92788ee334c7e92b765ea16ebab68dfe (patch) | |
| tree | b83adf75508036c43d0815def97ddaf46d12339d /scripts/kconfig/lexer.l | |
| parent | fcdec14365ec96f490cf1c8d9b618643ec88a95e (diff) | |
| parent | 9b9f5948afcdf583cb1b58e0c4cc327aa1820f5a (diff) | |
Merge tag 'kconfig-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kconfig updates from Masahiro Yamada:
- error out if a user specifies a directory instead of a file from
"Save" menu of GUI interfaces
- do not overwrite .config if there is no change in the configuration
- create parent directories as needed when a user specifies a new file
path from "Save" menu of menuconfig/nconfig
- fix potential buffer overflow
- some trivial cleanups
* tag 'kconfig-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: make conf_get_autoconfig_name() static
kconfig: use snprintf for formatting pathnames
kconfig: remove useless NULL pointer check in conf_write_dep()
kconfig: make parent directories for the saved .config as needed
kconfig: do not write .config if the content is the same
kconfig: do not accept a directory for configuration output
kconfig: remove trailing whitespaces
kconfig: Make nconf-cfg.sh executable
Diffstat (limited to 'scripts/kconfig/lexer.l')
| -rw-r--r-- | scripts/kconfig/lexer.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index c9df1c8b9824..6354c905b006 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l | |||
| @@ -378,7 +378,8 @@ FILE *zconf_fopen(const char *name) | |||
| 378 | if (!f && name != NULL && name[0] != '/') { | 378 | if (!f && name != NULL && name[0] != '/') { |
| 379 | env = getenv(SRCTREE); | 379 | env = getenv(SRCTREE); |
| 380 | if (env) { | 380 | if (env) { |
| 381 | sprintf(fullname, "%s/%s", env, name); | 381 | snprintf(fullname, sizeof(fullname), |
| 382 | "%s/%s", env, name); | ||
| 382 | f = fopen(fullname, "r"); | 383 | f = fopen(fullname, "r"); |
| 383 | } | 384 | } |
| 384 | } | 385 | } |
