From b85de8606364260c310f3c306b0a920e184e7e53 Mon Sep 17 00:00:00 2001 From: Achim Schneider Date: Sun, 19 Mar 2023 14:12:33 +0100 Subject: [PATCH] correct len --- primitives/arkworks/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/arkworks/src/utils.rs b/primitives/arkworks/src/utils.rs index 2e0c119a5e7b1..962bcf13e6718 100644 --- a/primitives/arkworks/src/utils.rs +++ b/primitives/arkworks/src/utils.rs @@ -26,7 +26,7 @@ where T: CanonicalDeserialize + Sized, { let mut cursor = Cursor::new(bytes.to_vec()); - let length = u32::deserialize_uncompressed_unchecked(cursor.clone())?; + let length = bytes.len() / 8; let mut result = Vec::with_capacity(length as usize); for _ in 0..length { result.push(T::deserialize_uncompressed_unchecked(&mut cursor)?);