HardenedBSD/usr.bin/split
Shawn Bayern 95032b58a1 Tighten boundary check in split(1) to prevent a potential buffer overflow.
Before increasing sufflen, make sure the current name plus two (including
the terminating NUL character and the to-be-added character) does not
exceed the fixed buffer length, and stop immediately if this would occur.

In worst case scenario the code would write an nul character beyond the
boundary, however it would be caught by open(2) and based on the memory
layout, we do not believe this would constitute a security vulnerability.

MFC after:	3 days
2024-05-03 01:29:20 -07:00
..
tests
Makefile usr.bin: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
Makefile.depend
split.1 usr.bin: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
split.c Tighten boundary check in split(1) to prevent a potential buffer overflow. 2024-05-03 01:29:20 -07:00