mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 16:01:54 -09:00
Commit324612d68efixed several compiler warnings, but actually introduced a new one by increasing the buffer size in confdata.c that gets passed along to file_write_dep in util.c, because buf2's size wasn't increased along with it. ./util.c: In function ‘file_write_dep’: ./util.c:86:26: warning: ‘%s’ directive writing 10 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=] 86 | sprintf(buf2, "%s%s", dir, name); | ^~ ./util.c:86:9: note: ‘sprintf’ output 11 or more bytes (assuming 4107) into a destination of size 4097 86 | sprintf(buf2, "%s%s", dir, name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by increasing the size of buf2 to match the passed buffer size. Signed-off-by: Devreese Jorik <jorik.devreese@barco.com> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit1f5095c1d3) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This is a copy of the kconfig code in the kernel (currently 4.17-rc2) tweaked to suit Buildroot. To update: cp -r /usr/src/linux/scripts/kconfig support/kconfig.new cd support/kconfig.new # zconf.lex.c and zconf.tab.c needs to be generated by 'make menuconfig' mv zconf.lex.c zconf.lex.c_shipped mv zconf.tab.c zconf.tab.c_shipped rm -rf tests/ cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore . quilt push -a # Fix any conflict cd .. rm -rf kconfig mv kconfig.new kconfig Then verify the toplevel targets work: config defconfig menuconfig nconfig xconfig gconfig oldconfig