diff options
| author | Jack O'Connor <[email protected]> | 2024-08-18 10:50:43 -0700 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2024-08-18 10:50:43 -0700 |
| commit | 93c989afee8fae5e3c05a54db563c84fd7b1a079 (patch) | |
| tree | b2d866ba84729b21be21d14611e75617faa27730 /src/platform.rs | |
| parent | 47f9283a937092ba212ad7f3df6183dd7bf1c447 (diff) | |
test that xof_many doesn't write more blocks than requested
Diffstat (limited to 'src/platform.rs')
| -rw-r--r-- | src/platform.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platform.rs b/src/platform.rs index 6e4ae25..3f47718 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -286,6 +286,10 @@ impl Platform { flags: u8, out: &mut [u8], ) { + if out.is_empty() { + // The current assembly implementation always outputs at least 1 block. + return; + } match self { // Safe because detect() checked for platform support. #[cfg(blake3_avx512_ffi)] |
