freebsd-skq/usr.bin/patch
kevans 8d897cba91 patch(1): Don't overrun line buffer in some cases
Patches like file.txt attached to PR 190195 with a final line formed
like ">(EOL)" could cause a copy past the end of the current line buffer. In the
case of PR 191641, this caused a duplicate line to be copied into the resulting
file.

Instead of running past the end, treat it as if it were a blank line.

PR:		191641
Reviewed by:	cem, emaste, pfg
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12609
2017-10-09 14:50:02 +00:00
..
backupfile.c
backupfile.h
common.h
inp.c bc/dc/patch: make some use of reallocarray(3). 2017-03-05 16:10:35 +00:00
inp.h
Makefile
Makefile.depend
mkpath.c
patch.1
patch.c patch(1): replace strnlen() with a simpler strlen(). 2017-01-02 18:27:35 +00:00
pathnames.h
pch.c patch(1): Don't overrun line buffer in some cases 2017-10-09 14:50:02 +00:00
pch.h Revert r311106: 2017-01-02 18:23:31 +00:00
util.c
util.h