Skip to content

Panic on pasing zero-length byte array to EncryptedMessage::from_bytes #7

@mikroskeem

Description

@mikroskeem

When you pass a zero length (or <32 len) byte array to EncryptedMessage::from_bytes, it will panic

thread 'tokio-runtime-worker' panicked at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-ecies-0.1.0/src/lib.rs:545:63:
range end index 32 out of range for slice of length 0

match generic_ec::Point::<S::E>::from_bytes(&bytes[..compressed_len]) {

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