linux/scripts/kconfig
Nathan Chancellor 60f8bcb3ff kconfig: Avoid format overflow warning from GCC 8.1
commit 2ae89c7a82 upstream.

In file included from scripts/kconfig/zconf.tab.c:2485:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:773:22: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(newname, "%s%s", dirname, basename);
                      ^~
scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
  sprintf(newname, "%s%s", dirname, basename);
                   ^~~~~~
scripts/kconfig/confdata.c:773:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  sprintf(newname, "%s%s", dirname, basename);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:776:23: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
                       ^~~~~~~~~~~
scripts/kconfig/confdata.c:776:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of tmpname and newname to make GCC happy.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-11-20 18:05:09 +00:00
..
lxdialog kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
.gitignore kconfig: remove lkc_defs.h from .gitignore and dontdiff 2012-07-13 15:08:25 +02:00
check.sh kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
conf.c kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
confdata.c kconfig: Avoid format overflow warning from GCC 8.1 2018-11-20 18:05:09 +00:00
expr.c kconfig: Fix malloc handling in conf tools 2012-11-20 12:12:47 +01:00
expr.h kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT 2014-04-07 16:36:09 -07:00
gconf.c kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
images.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kxgettext.c kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
list.h kconfig: fix lists definition for C++ 2013-04-29 19:55:56 +02:00
lkc.h kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT 2014-04-07 16:36:09 -07:00
lkc_proto.h mconf/nconf: mark empty menus/menuconfigs different from non-empty ones 2013-06-18 23:58:59 +02:00
Makefile Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-06-12 21:29:20 -07:00
mconf.c kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
menu.c kconfig: return 'false' instead of 'no' in bool function 2016-02-02 19:46:40 +00:00
merge_config.sh merge_config.sh: Avoid creating unnessary source softlinks 2013-04-10 10:55:22 +02:00
nconf.c kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
nconf.gui.c kconfig/nconf: Fix hang when editing symbol with a long prompt 2017-03-16 02:26:33 +00:00
nconf.h scripts/kconfig/nconf: dynamically alloc dialog_input_result 2011-09-09 14:40:08 +02:00
POTFILES.in kconfig: gettext support for lxdialog 2008-01-28 23:14:39 +01:00
qconf.cc xconfig: Fix the filename for GUI settings 2013-10-08 23:52:16 +02:00
qconf.h xconfig: Fix the filename for GUI settings 2013-10-08 23:52:16 +02:00
streamline_config.pl localmodconfig: Use Kbuild files too 2015-09-03 13:29:47 +01:00
symbol.c kconfig: fix trivial typos and update mconf documentation 2013-10-08 23:52:14 +02:00
util.c kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
zconf.gperf kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT 2014-04-07 16:36:09 -07:00
zconf.hash.c_shipped kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT 2014-04-07 16:36:09 -07:00
zconf.l kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
zconf.lex.c_shipped kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
zconf.tab.c_shipped kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00
zconf.y kbuild: trivial - use tabs for code indent where possible 2014-06-10 14:00:53 +02:00