summary refs log tree commit diff
path: root/qcow
diff options
context:
space:
mode:
Diffstat (limited to 'qcow')
-rw-r--r--qcow/src/qcow.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/qcow/src/qcow.rs b/qcow/src/qcow.rs
index 261c737..df504de 100644
--- a/qcow/src/qcow.rs
+++ b/qcow/src/qcow.rs
@@ -455,7 +455,7 @@ impl Read for QcowFile {
 
             if let Some(offset) = file_offset {
                 self.file.seek(SeekFrom::Start(offset))?;
-                self.file.read(&mut buf[nread..(nread + count)])?;
+                self.file.read_exact(&mut buf[nread..(nread + count)])?;
             } else {
                 // Previously unwritten region, return zeros
                 for b in (&mut buf[nread..(nread + count)]).iter_mut() {