-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dd: handle stdout redirected to seekable file
Fix a bug in `dd` where null bytes would be unintentionally written if stdout were redirected to a seekable file. For example, before this commit, if `dd` were invoked from the command-line as dd if=infile bs=1 count=10 seek=5 > /dev/sda1 then five zeros would be written to `/dev/sda1` before copying ten bytes of `infile` to `/dev/sda1`. After this commit, `dd` will correctly seek five bytes forward in `/dev/sda1` before copying the ten bytes of `infile`. Fixes #3542.
- Loading branch information
Showing
1 changed file
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters