Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlbertVeli/8727d0924a594a1ff50a2d4e1e56c1eb to your computer and use it in GitHub Desktop.
Save AlbertVeli/8727d0924a594a1ff50a2d4e1e56c1eb to your computer and use it in GitHub Desktop.
JtR sprintf compile warnings when configuring with --enable-ztex
last commit: 2020-03-04 17:20 +0200 Maxim Ivanov
0674b6994 - Error out when not SYSTEMWIDE and john_home_path detected empty (#4218)
./configure --enable-ztex
...
Configured for building John the Ripper jumbo:
Target CPU ................................. x86_64 AVX2, 64-bit LE
AES-NI support ............................. run-time detection
Target OS .................................. linux-gnu
Cross compiling ............................ no
Legacy arch header ......................... x86-64.h
Optional libraries/features found:
Memory map (share/page large files) ........ yes
Fork support ............................... yes
OpenMP support ............................. yes (not for fast formats)
OpenCL support ............................. yes
Generic crypt(3) format .................... yes
libgmp (PRINCE mode and faster SRP formats) yes
128-bit integer (faster PRINCE mode) ....... yes
libz (pkzip and some other formats) ........ yes
libbz2 (gpg2john extra decompression logic) yes
libpcap (vncpcap2john and SIPdump) ......... yes
OpenMPI support (default disabled) ......... no
ZTEX USB-FPGA module 1.15y support ......... yes
$ gcc --version
gcc (Gentoo 9.2.0-r2 p3) 9.2.0
$ make (optional, -j4)
...
make[3]: Leaving directory '/home/albert/source/other_sources/JohnTheRipper/src/ztex/pkt_comm'
gcc -c -Wall -O2 device.c
device.c: In function ‘device_init_fpgas’:
device.c:162:32: warning: ‘%d’ directive writing 1 byte into a region of size between 0 and 255 [-Wformat-overflow=]
162 | sprintf(conf_name_freq, "%s_%d", conf_name_board_freq, fpga_num + 1);
| ^~
device.c:162:28: note: directive argument in the range [1, 5]
162 | sprintf(conf_name_freq, "%s_%d", conf_name_board_freq, fpga_num + 1);
| ^~~~~~~
In file included from /usr/include/stdio.h:867,
from device.c:12:
/usr/include/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 258 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
device.c:212:34: warning: ‘%d’ directive writing 1 byte into a region of size between 0 and 255 [-Wformat-overflow=]
212 | sprintf(conf_name_config1, "%s_%d", conf_name_board_config1,
| ^~
device.c:212:30: note: directive argument in the range [1, 5]
212 | sprintf(conf_name_config1, "%s_%d", conf_name_board_config1,
| ^~~~~~~
In file included from /usr/include/stdio.h:867,
from device.c:12:
/usr/include/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 258 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
Make process completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment