HomeFreeBSD

MFC r324431: patch(1): Don't overrun line buffer in some cases

Description

MFC r324431: 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

Details

Provenance
kevansAuthored on
Parents
rS328146: Pull in r322106 from upstream llvm trunk (by Alexey Bataev):
Branches
Unknown
Tags
Unknown