diff options
author | thomas <thomas@FreeBSD.org> | 2014-05-07 19:33:29 +0000 |
---|---|---|
committer | thomas <thomas@FreeBSD.org> | 2014-05-07 19:33:29 +0000 |
commit | a29159cd7017aa3c4d98805b5cec49b464eb0b7c (patch) | |
tree | 4706b9b8d40564ba7f2cf3a7979e41bc05a4ff61 /include/ndbm.h | |
parent | 9ea4556f36ce28f396d3100b29e0586d7eeef1c4 (diff) | |
download | FreeBSD-src-a29159cd7017aa3c4d98805b5cec49b464eb0b7c.zip FreeBSD-src-a29159cd7017aa3c4d98805b5cec49b464eb0b7c.tar.gz |
(dd_out): Fix handling of all-zeroes block at end of input with
conv=sparse.
This change fixes two separate issues observed when the last output
block is all zeroes, and conv=sparse is in use. In this case, care
must be taken to roll back the last seek and write the entire last zero
block at the original offset where it should have occurred: when the
destination file is a block device, it is not possible to roll back
by just one character as the write would then not be properly aligned.
Furthermore, the buffer used to write this last all-zeroes block
needs to be properly zeroed-out. This was not the case previously,
resulting in a junk data byte appearing instead of a zero in the
output stream.
PR: bin/189174
PR: bin/189284
Reviewed by: kib
MFC after: 2 weeks
Diffstat (limited to 'include/ndbm.h')
0 files changed, 0 insertions, 0 deletions