Skip to content

Create bug: invalid length control in storage #121

Description

@XianPaz

In https://github.com/paritytech/ink/blob/762730c63daa11f1f3349f5f6d43c77ca7468ddb/crates/storage/src/lazy/mapping.rs#L174

try_insert() check key.length() + value.length() <= 2^14

Then calls insert() , but in insert() inserts the tuple (&KeyType::KEY, key) where KeyType::KEY is a u32, so needing to serialize set_contract_storage which is something of length key.length() + 4.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions