Skip to content

Commit

Permalink
verifier: Fix corruption in certs > 512 bytes.
Browse files Browse the repository at this point in the history
  • Loading branch information
flihp committed Dec 8, 2023
1 parent 65fa28c commit 5d6ebf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions verifier/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl AttestHiffy {
tmp.path(),
format!("index={},offset={}", index, offset),
)?;
tmp.read_exact(&mut out[offset..Self::CHUNK_SIZE])?;
tmp.read_exact(&mut out[offset..offset + Self::CHUNK_SIZE])?;
}

let remain = out.len() % Self::CHUNK_SIZE;
Expand Down Expand Up @@ -338,7 +338,7 @@ impl AttestHiffy {
tmp.path(),
format!("offset={}", offset),
)?;
tmp.read_exact(&mut out[offset..Self::CHUNK_SIZE])?;
tmp.read_exact(&mut out[offset..offset + Self::CHUNK_SIZE])?;
}

let remain = out.len() % Self::CHUNK_SIZE;
Expand Down

0 comments on commit 5d6ebf9

Please sign in to comment.