mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-05-18 20:36:07 +02:00
shrink a stack array that's twice as big as it needs to be
It looks like I originally made this mistake when I was copying code
from the baokeshed prototype (a274a9b0fa
),
and then it got replicated into the C implementation later.
This commit is contained in:
parent
e0f193ddc9
commit
c908847c3f
|
@ -335,7 +335,7 @@ INLINE void compress_subtree_to_parent_node(
|
|||
assert(input_len > BLAKE3_CHUNK_LEN);
|
||||
#endif
|
||||
|
||||
uint8_t cv_array[2 * MAX_SIMD_DEGREE_OR_2 * BLAKE3_OUT_LEN];
|
||||
uint8_t cv_array[MAX_SIMD_DEGREE_OR_2 * BLAKE3_OUT_LEN];
|
||||
size_t num_cvs = blake3_compress_subtree_wide(input, input_len, key,
|
||||
chunk_counter, flags, cv_array);
|
||||
|
||||
|
|
|
@ -660,7 +660,7 @@ fn compress_subtree_to_parent_node<J: Join>(
|
|||
platform: Platform,
|
||||
) -> [u8; BLOCK_LEN] {
|
||||
debug_assert!(input.len() > CHUNK_LEN);
|
||||
let mut cv_array = [0; 2 * MAX_SIMD_DEGREE_OR_2 * OUT_LEN];
|
||||
let mut cv_array = [0; MAX_SIMD_DEGREE_OR_2 * OUT_LEN];
|
||||
let mut num_cvs =
|
||||
compress_subtree_wide::<J>(input, &key, chunk_counter, flags, platform, &mut cv_array);
|
||||
debug_assert!(num_cvs >= 2);
|
||||
|
|
Loading…
Reference in New Issue