Skip to content

crypto-common: fix SerializableState implementation for [u128; N] - #2471

Merged
newpavlov merged 2 commits into
RustCrypto:masterfrom
Eh2406:master
Jul 3, 2026
Merged

crypto-common: fix SerializableState implementation for [u128; N]#2471
newpavlov merged 2 commits into
RustCrypto:masterfrom
Eh2406:master

Conversation

@Eh2406

@Eh2406 Eh2406 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Found with AI and Scrutineer. There appears to be a typo that incorrectly records the size of u126. The following test fails before this fix, and passes after it.

#[test]
fn test_serializable_state_u128_array() {
    let array: [u128; 4] = [1; 4];
    let serialized = array.serialize();
    let deserialized = <[u128; 4]>::deserialize(&serialized).unwrap();
    assert_eq!(array, deserialized);
}

@newpavlov newpavlov changed the title fix rong size for u128 crypto-common: fix SerializableState implementation for [u128; N] Jul 3, 2026
@newpavlov
newpavlov merged commit 14d3d2c into RustCrypto:master Jul 3, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants