If the comment for a hunk contains an ASCII NUL, then no newline would be
output before the first line of context (as the c-string 'ended'
prematurely). This breaks the patch such that it cannot be applied, even
with a fuzz factor. Handle this unorthodox case to better support binary
files.
Included is a simplified test case showing the issue.
If the comment for a hunk contains an ASCII NUL, then no newline would be output before the first line of context (as the c-string 'ended' prematurely). This breaks the patch such that it cannot be applied, even with a fuzz factor. Handle this unorthodox case to better support binary files.
Included is a simplified test case showing the issue.