freebsd-skq/usr.bin/patch
Kyle Evans bc4f0fe358 patch(1): don't assume a match if we run out of context to check
Patches with very little context (-U0 and -U1) could get misapplied if
the file to be patched changes and a hunk is no longer applicable. Matching
with fuzz would be attempted and default to a match when we unexpectedly ran
out of context.

This also affected patches with higher levels of context but had limited
actual context due to the hunk being located near the beginning/end of file.

PR:		74127, 223545 (exp-run)
Reviewed by:	emaste, pfg
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12631
2017-11-22 03:44:19 +00:00
..
backupfile.c
backupfile.h
common.h patch(1): make some macros look boolean. 2016-10-01 20:46:01 +00:00
inp.c bc/dc/patch: make some use of reallocarray(3). 2017-03-05 16:10:35 +00:00
inp.h
Makefile
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mkpath.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
patch.1
patch.c patch(1): don't assume a match if we run out of context to check 2017-11-22 03:44:19 +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