Date: Wed, 3 Jul 2013 22:46:30 +0000 (UTC) From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252637 - head/usr.bin/patch Message-ID: <201307032246.r63MkULI047455@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: obrien Date: Wed Jul 3 22:46:30 2013 New Revision: 252637 URL: http://svnweb.freebsd.org/changeset/base/252637 Log: Merge r252513 from src/gnu/usr.bin/patch into src/usr.bin/patch: Properly handle input lines containing NUL characters such that pgets() accurately fills the read buffer. Callers of pgets() still mis-process the buffer contents if the read line contains NUL characters, but this at least makes pgets() accurate. Modified: head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Wed Jul 3 22:44:26 2013 (r252636) +++ head/usr.bin/patch/pch.c Wed Jul 3 22:46:30 2013 (r252637) @@ -1204,7 +1204,7 @@ pgets(bool do_indent) indent++; } } - strncpy(buf, line, len - skipped); + memcpy(buf, line, len - skipped); buf[len - skipped] = '\0'; } return len;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307032246.r63MkULI047455>