diff options
| author | Warner Losh <imp@FreeBSD.org> | 2020-08-16 23:55:23 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2020-08-16 23:55:23 +0000 |
| commit | c7cddf955f7a643abe6f999632e005ad9d834885 (patch) | |
| tree | 70c049fe9004d67da8294e53ec2f8a7cd3fb4988 /usr.bin/patch | |
| parent | beb27033aaaeef55a8799a785c15347b4a94d94b (diff) | |
Notes
Diffstat (limited to 'usr.bin/patch')
| -rw-r--r-- | usr.bin/patch/pch.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c index 24e3eea5f297..70051640cf0c 100644 --- a/usr.bin/patch/pch.c +++ b/usr.bin/patch/pch.c @@ -587,16 +587,11 @@ another_hunk(void) len = pgets(true); p_input_line++; if (len == 0) { - if (p_max - p_end < 4) { - /* assume blank lines got chopped */ - strlcpy(buf, " \n", buf_size); - } else { - if (repl_beginning && repl_could_be_missing) { - repl_missing = true; - goto hunk_done; - } - fatal("unexpected end of file in patch\n"); + if (repl_beginning && repl_could_be_missing) { + repl_missing = true; + goto hunk_done; } + fatal("unexpected end of file in patch\n"); } p_end++; if (p_end >= hunkmax) |
