Skip to content

Panic in FromBytes functions #6

@tomtau

Description

@tomtau

Right now, it seems FromBytes functions assume the byte slices in arguments have correct lengths -- if not, they'll panic.
This assumption should ideally be documented or more explicitly handled (e.g. by returning a nil or an error instead of a panic).

An example panic:

panic: runtime error: index out of range [1] with length 1

goroutine 9 [running]:
encoding/binary.bigEndian.Uint16(...)
        /usr/local/go/src/encoding/binary/binary.go:101
github.com/taurusgroup/frost-ed25519/pkg/frost/party.FromBytes(...)

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