mirror of
https://github.com/curl/curl.git
synced 2025-01-12 13:55:11 +08:00
bbac7c19e5
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 |
||
---|---|---|
.. | ||
Platforms | ||
cmake_uninstall.cmake.in | ||
CMakeConfigurableFile.in | ||
curl-config.cmake.in | ||
CurlSymbolHiding.cmake | ||
CurlTests.c | ||
FindBearSSL.cmake | ||
FindBrotli.cmake | ||
FindCARES.cmake | ||
FindGSS.cmake | ||
FindLibPSL.cmake | ||
FindLibSSH2.cmake | ||
FindMbedTLS.cmake | ||
FindMSH3.cmake | ||
FindNGHTTP2.cmake | ||
FindNGHTTP3.cmake | ||
FindNGTCP2.cmake | ||
FindQUICHE.cmake | ||
FindWolfSSL.cmake | ||
FindZstd.cmake | ||
Macros.cmake | ||
OtherTests.cmake | ||
PickyWarnings.cmake | ||
Utilities.cmake |