freebsd-src/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 patch(1): Add -Vnone option to disable backup files 2015-07-21 22:57:27 +00:00
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 Drop build option switch for the older GNU patch. 2013-08-29 00:38:24 +00:00
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 Remove automatic checkout feature. 2015-08-15 00:42:33 +00:00
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 Fix shell injection vulnerability in patch(1) via ed(1) by 2015-08-05 22:04:54 +00:00
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 Remove automatic checkout feature. 2015-08-15 00:42:33 +00:00
util.h Remove automatic checkout feature. 2015-08-15 00:42:33 +00:00