mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 10:01:02 +01:00
25945af47e
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 |
||
---|---|---|
.. | ||
atf | ||
atrun | ||
blacklistd-helper | ||
bootpd | ||
comsat | ||
dma | ||
fingerd | ||
flua | ||
ftpd | ||
getty | ||
hyperv | ||
kgdb | ||
mail.local | ||
makewhatis.local | ||
mknetid | ||
nuageinit | ||
phttpget | ||
pppoed | ||
rbootd | ||
rc | ||
revnetgroup | ||
rpc.rquotad | ||
rpc.rstatd | ||
rpc.rusersd | ||
rpc.rwalld | ||
rpc.sprayd | ||
rtld-elf | ||
rtld-elf32 | ||
save-entropy | ||
smrsh | ||
talkd | ||
tcpd | ||
tests | ||
tftp-proxy | ||
tftpd | ||
ulog-helper | ||
ypxfr | ||
Makefile | ||
Makefile.inc |