Bug 31156

Summary: uuencode should pad with nulls instead of random garbage
Product: Base System Reporter: jon r. luini <falcon>
Component: binAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-RELEASE   
Hardware: Any   
OS: Any   

Description jon r. luini 2001-10-09 09:10:01 UTC
	when uuencode's input is not a multiple of 4, garbage is used to
	pad it out, according to the doc. it's much more useful to pad
	with nulls since it provides consistent output when compared against
	another implementation.

Fix: 

clear the buffer before reading into it each iteration of the loop,
	or if you prefer, manually assign nulls only when necessary.
How-To-Repeat: 	write your own version of uuencode which doesn't use un-initialized
	data and compare the output of both on an input data which isn't a
	multiple of 4 bytes in length.
Comment 1 ru freebsd_committer freebsd_triage 2001-10-09 12:05:49 UTC
State Changed
From-To: open->closed

Fixed in uuencode/uuencode.c,v 1.7 and uuencode/uuencode.format.5,v 1.12. 


Comment 2 ru freebsd_committer freebsd_triage 2001-10-09 12:05:49 UTC
Responsible Changed
From-To: freebsd-bugs->ru