HardenedBSD/libexec
Dag-Erling Smørgrav 25945af47e tftpd: silence gcc overflow warnings
GCC 13 complains that we might be writing too much to an on-stack buffer
when createing a filename.

In practice there is a check that filename isn't too long given the
time format and other static characters so GCC is incorrect, but GCC
isn't wrong that we're potentially trying to put a MAXPATHLEN length
string + some other characters into a MAXPATHLEN buffer (if you ignore
the check GCC can't realistically evaluate at compile time).

Switch to snprintf to populate filename to ensure that future logic
errors don't result in a stack overflow.

Shorten the questionably named yyyymmdd buffer enough to slience the
warning (checking the snprintf return value isn't sufficent) while
preserving maximum flexibility for admins who use the -F option.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D45086
2024-05-10 23:16:26 +02:00
..
atf
atrun at cron file is now in /etc/cron.d 2024-05-09 22:34:06 -06:00
blacklistd-helper Track upstream project rename in contrib/blocklistd 2023-11-03 16:53:04 -04:00
bootpd bootpd(8): Fix a typo in a source code comment 2024-01-22 21:46:31 +01:00
comsat Remove copyright strings ifdef'd out 2023-11-26 22:23:58 -07:00
dma dma.conf: Fix typo 2024-03-27 10:37:22 -04:00
fingerd Remove copyright strings ifdef'd out 2023-11-26 22:23:58 -07:00
flua
ftpd libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
getty libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
hyperv
kgdb crashinfo: Print stack traces for all on-CPU threads 2024-01-15 16:36:40 -05:00
mail.local libexec: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
makewhatis.local
mknetid libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
nuageinit nuageinit: add basic support for cloudinit. 2024-03-15 09:22:16 +01:00
phttpget Remove remnants of portsnap(8) 2024-04-30 22:44:34 +09:00
pppoed
rbootd libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
rc New sysctl to disable NOMATCH until devmatch runs 2024-05-09 17:56:40 -07:00
revnetgroup
rpc.rquotad libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
rpc.rstatd libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
rpc.rusersd
rpc.rwalld
rpc.sprayd
rtld-elf rtld.1: clarify interaction between -u and -o 2024-04-30 03:26:55 +03:00
rtld-elf32
save-entropy
smrsh libexec: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
talkd libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
tcpd
tests
tftp-proxy
tftpd tftpd: silence gcc overflow warnings 2024-05-10 23:16:26 +02:00
ulog-helper
ypxfr
Makefile nuageinit: add basic support for cloudinit. 2024-03-15 09:22:16 +01:00
Makefile.inc libexec: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00