summaryrefslogtreecommitdiff
path: root/docs/examples/crawler.c
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2023-09-20 14:02:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-09-21 08:47:07 +0200
commitbbac7c19e50bcfcdc20cd848ce53e3e7e6929ce0 (patch)
tree39dc053293d4ef88296fb3bce167b5789520c169 /docs/examples/crawler.c
parentd6d458b1cf1bf2c34cd39cff9ef9a0e0070b992c (diff)
tftpd: always use curl's own tftp.h
Using the system's provided arpa/tftp.h and optimizing, GCC 12 detects and reports a stringop-overread warning: tftpd.c: In function ‘write_behind.isra’: tftpd.c:485:12: warning: ‘write’ reading between 1 and 2147483647 bytes from a region of size 0 [-Wstringop-overread] 485 | return write(test->ofile, writebuf, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from tftpd.c:71: /usr/include/arpa/tftp.h:58:30: note: source object ‘tu_data’ of size 0 58 | char tu_data[0]; /* data or error string */ | ^~~~~~~ This occurs because writebuf points to this field and the latter cannot be considered as being of dynamic length because it is not the last field in the structure. Thus it is bound to its declared size. This commit always uses curl's own version of tftp.h where the target field is last in its structure, effectively avoiding the warning. As HAVE_ARPA_TFTP_H is not used anymore, cmake/configure checks for arpa/tftp.h are removed. Closes #11897
Diffstat (limited to 'docs/examples/crawler.c')
0 files changed, 0 insertions, 0 deletions