Bug 19642

Summary: patch to merge OpenBSD changes to patch(1)
Product: Base System Reporter: kbyanc <kbyanc>
Component: gnuAssignee: Mark Linimon <linimon>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description kbyanc 2000-07-02 15:50:01 UTC
	Not surprisingly, OpenBSD has fixed a number of potential security
	holes in patch(1), this patch merges those changes into FreeBSD's
	patch(1). Specifically, the attached patch catches a number of
	buffer overflow cases as well as the standard mktemp race
	conditions.

	Beyond just security, OpenBSD has also generally cleaned up the
	code a bit, which changes I have also included. Basically, this
	just entails replacing magic numbers with #defines and answering
	-Wall's warnings (note, however -Wall still complains about a few
	non-issues).

	As a followup to this patch, with permission, I would like to also
	remove all the obsolete $Log entries at the tops of the source
	files.

	Finally, for the record, I am somewhat confused about the presence
	of contrib/patch also. The version in contrib is a much newer
	(albeit entirely GPL'ed) version of patch. However, as best I can
	tell it is completely unreferenced. The version of patch in
	gnu/usr.bin/patch (the version this diff was taken against) is the
	version installed as part of `make world`. It would appear that
	the copy in contrib/patch is superfluous.

	-Kelly
Comment 1 kbyanc freebsd_committer freebsd_triage 2000-08-02 06:05:33 UTC
Responsible Changed
From-To: freebsd-bugs->kbyanc

Taking my own PR.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2007-03-09 00:09:45 UTC
State Changed
From-To: open->closed

These patches are long-ago obsoleted by events, including some refactoring 
and re-importing from NetBSD. 


Comment 3 Mark Linimon freebsd_committer freebsd_triage 2007-03-09 00:09:45 UTC
Responsible Changed
From-To: kbyanc->linimon