curl/tests/server
Patrick Monnerat bbac7c19e5
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
2023-09-21 08:47:07 +02:00
..
.gitignore tidy-up: mostly whitespace nits 2023-08-31 23:02:10 +00:00
base64.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CMakeLists.txt cmake: support building static and shared libcurl in one go 2023-07-29 00:40:01 +00:00
disabled.c lib: add ability to disable auths individually 2023-09-07 17:45:06 +02:00
fake_ntlm.c tests: fix fake_ntlm to run with a dynamic log directory 2023-03-30 09:53:57 -07:00
getpart.c server/getpart: clear the buffer before load 2023-03-23 14:46:07 +01:00
getpart.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.am copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.inc copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mqttd.c tests/tftpd+mqttd: make variables static to silence picky warnings 2023-08-06 17:21:25 +02:00
resolve.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
rtspd.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
server_setup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
server_sockaddr.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
sockfilt.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
socksd.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
sws.c http: close the connection after a late 417 is received 2023-08-22 15:32:16 -07:00
testpart.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tftp.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tftpd.c tftpd: always use curl's own tftp.h 2023-09-21 08:47:07 +02:00
util.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
util.h tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00