]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r326084: patch(1): don't assume match if we run out of context to check
authorkevans <kevans@FreeBSD.org>
Thu, 18 Jan 2018 21:53:07 +0000 (21:53 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 18 Jan 2018 21:53:07 +0000 (21:53 +0000)
commitcf061e9c775ef6885d6864aeb2c3fcb067c51002
treef8720b3680073c10628e3f73c549d06da99097ba
parent74eac5ce4a8596f71ab65a2a416dca94cdb17fe7
MFC r326084: patch(1): don't assume 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
usr.bin/patch/patch.c