Date: Wed, 9 Sep 2020 22:42:14 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365535 - stable/12/usr.bin/patch Message-ID: <202009092242.089MgEnE030535@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Sep 9 22:42:14 2020 New Revision: 365535 URL: https://svnweb.freebsd.org/changeset/base/365535 Log: MFC r364291: r364291 | imp | 2020-08-16 17:55:23 -0600 (Sun, 16 Aug 2020) | 33 lines Remove heuristic for dealing with trailing newlines being truncated by mailers. ... Modified: stable/12/usr.bin/patch/pch.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/patch/pch.c ============================================================================== --- stable/12/usr.bin/patch/pch.c Wed Sep 9 22:40:39 2020 (r365534) +++ stable/12/usr.bin/patch/pch.c Wed Sep 9 22:42:14 2020 (r365535) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009092242.089MgEnE030535>