Closed linxon closed 5 years ago
Thank you @linxon for reporting this. It is an issue, workaround is to use our copy of iniparser.
what do you think about these warnings and it can be critical in the future?
...
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/hypervisor_bridge.o src/hypervisor_bridge.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/nio_linux_raw.o src/nio_linux_raw.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/hypervisor_docker.o src/hypervisor_docker.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/hypervisor_iol_bridge.o src/hypervisor_iol_bridge.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/hypervisor_brctl.o src/hypervisor_brctl.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/netlink/nl.o src/netlink/nl.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/iniparser/iniparser.o src/iniparser/iniparser.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -c -o src/iniparser/dictionary.o src/iniparser/dictionary.c
src/iniparser/iniparser.c: In function ‘iniparser_load’:
src/iniparser/iniparser.c:705:32: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(tmp, "%s:%s", section, key);
^
In file included from /usr/include/stdio.h:867,
from src/iniparser/iniparser.h:17,
from src/iniparser/iniparser.c:11:
/usr/include/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 2050 bytes into a destination of size 2049
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -DLINUX_RAW -Wl,-O1 -Wl,--as-needed -o ubridge src/ubridge.o src/nio.o src/nio_udp.o src/nio_unix.o src/nio_ethernet.o src/nio_tap.o src/parse.o src/packet_filter.o src/pcap_capture.o src/pcap_filter.o src/hypervisor.o src/hypervisor_parser.o src/hypervisor_bridge.o src/nio_linux_raw.o src/hypervisor_docker.o src/hypervisor_iol_bridge.o src/hypervisor_brctl.o src/netlink/nl.o src/iniparser/iniparser.o src/iniparser/dictionary.o -lpthread -lpcap
>>> Source compiled.
P.S. gcc-8.3.0
@linxon Indeed, updated iniparser and fixed issue in the latest release: https://github.com/GNS3/ubridge/releases/tag/v0.9.16
@ziajka thank you! :)
do I have to use the
SYSTEM_INIPARSER
option in the latest version? https://github.com/GNS3/ubridge/blob/8d4e39470ae111827341281e84ac2a3f591df815/Makefile#L68because when I enable it I get these errors while compiling:
diff
output btw initparser.c and your src/iniparser/iniparser.c: