From owner-svn-src-all@FreeBSD.ORG Fri Oct 30 11:13:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04A9F106566B; Fri, 30 Oct 2009 11:13:01 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCBAF8FC25; Fri, 30 Oct 2009 11:13:00 +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 n9UBD0o5041924; Fri, 30 Oct 2009 11:13:00 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9UBD0ET041921; Fri, 30 Oct 2009 11:13:00 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200910301113.n9UBD0ET041921@svn.freebsd.org> From: Colin Percival Date: Fri, 30 Oct 2009 11:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198671 - in head/usr.bin/bsdiff: bsdiff bspatch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2009 11:13:01 -0000 Author: cperciva Date: Fri Oct 30 11:13:00 2009 New Revision: 198671 URL: http://svn.freebsd.org/changeset/base/198671 Log: Add notes pointing out that bsdiff does not store file hashes and bspatch thus does not verify file hashes, and that consequently it is recommended that users store hashes separately and verify files before and after running bspatch. Requested by: BugMagnet MFC after: 1 week Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.1 head/usr.bin/bsdiff/bspatch/bspatch.1 Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.1 ============================================================================== --- head/usr.bin/bsdiff/bsdiff/bsdiff.1 Fri Oct 30 10:10:39 2009 (r198670) +++ head/usr.bin/bsdiff/bsdiff/bsdiff.1 Fri Oct 30 11:13:00 2009 (r198671) @@ -65,5 +65,24 @@ an absolute minimum working set size of .Ar oldfile . .Sh SEE ALSO .Xr bspatch 1 +.Sh BUGS +The +.Nm +utility does not store the hashes of +.Ar oldfile +or +.Ar newfile +in +.Ar patchfile . +As a result, it is possible to apply a patch to the wrong file; this +will usually produce garbage. +It is recommended that users of +.Nm +store the hashes of +.Ar oldfile +and +.Ar newfile +and compare against them before and after applying +.Ar patchfile . .Sh AUTHORS .An Colin Percival Aq cperciva@FreeBSD.org Modified: head/usr.bin/bsdiff/bspatch/bspatch.1 ============================================================================== --- head/usr.bin/bsdiff/bspatch/bspatch.1 Fri Oct 30 10:10:39 2009 (r198670) +++ head/usr.bin/bsdiff/bspatch/bspatch.1 Fri Oct 30 11:13:00 2009 (r198671) @@ -61,5 +61,26 @@ but can tolerate a very small working se of performance. .Sh SEE ALSO .Xr bsdiff 1 +.Sh BUGS +The +.Nm +utility does not verify that +.Ar oldfile +is the correct source file for +.Ar patchfile . +Attempting to apply a patch to the wrong file will usually produce +garbage; consequently it is strongly recommended that users of +.Nm +verify that +.Ar oldfile +matches the source file from which +.Ar patchfile +was built, by comparing cryptographic hashes, for example. +Users may also wish to verify after running +.Nm +that +.Ar newfile +matches the target file from which +.Ar was built. .Sh AUTHORS .An Colin Percival Aq cperciva@FreeBSD.org