Bug 22347

Summary: dd copies incorrect data after 2^32 bytes and I/O error
Product: Base System Reporter: James Risner <risner>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description James Risner 2000-10-27 15:20:01 UTC
When using /bin/dd with bad sectors, /bin/dd truncates the seek location to 32 bits
after errors.

How-To-Repeat: 
	When /bin/dd copies data from a disk with an I/O error and the disk has
bad sectors more than 2^32 bytes into the file, dd does lseeks to skip the bad
sectors.  This lseek is not cast to off_t which causes it to be truncated at 32 bits.
This both causes dd to copy the wrong data.
Comment 1 iedowse freebsd_committer freebsd_triage 2001-11-17 20:28:47 UTC
State Changed
From-To: open->closed


The supplied patch is a no-op with current dd sources (it casts 
arguments to types they already are), so I guess the problem was 
already fixed in a different way.