From owner-svn-src-stable-7@FreeBSD.ORG Thu Apr 7 16:06:39 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9145106566B; Thu, 7 Apr 2011 16:06:39 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B628C8FC12; Thu, 7 Apr 2011 16:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p37G6deC045534; Thu, 7 Apr 2011 16:06:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p37G6dDa045532; Thu, 7 Apr 2011 16:06:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201104071606.p37G6dDa045532@svn.freebsd.org> From: Jaakko Heinonen Date: Thu, 7 Apr 2011 16:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220426 - stable/7/usr.bin/truss X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 16:06:39 -0000 Author: jh Date: Thu Apr 7 16:06:39 2011 New Revision: 220426 URL: http://svn.freebsd.org/changeset/base/220426 Log: MFC r216224: Don't write the terminating NUL past end of buffer. PR: bin/152345 Modified: stable/7/usr.bin/truss/syscalls.c Directory Properties: stable/7/usr.bin/truss/ (props changed) Modified: stable/7/usr.bin/truss/syscalls.c ============================================================================== --- stable/7/usr.bin/truss/syscalls.c Thu Apr 7 14:17:55 2011 (r220425) +++ stable/7/usr.bin/truss/syscalls.c Thu Apr 7 16:06:39 2011 (r220426) @@ -475,7 +475,7 @@ get_string(pid_t pid, void *offset, int buf = realloc(buf, totalsize); size = BLOCKSIZE; } else { - buf[totalsize] = '\0'; + buf[totalsize - 1] = '\0'; return (buf); } }