Skip to content

msgpack.loads hangs for a long time on invalid input #97

Description

@knsd

Minimal reproducible example:

from msgpack import loads
#      ---------------------- Array 32
#     |           ----------- Large number
#     |          |        --- No other data
#     |          |       |
#     v          v       v
s = "\xdd\xff\x00\x00\x00"
loads(s)

Function loads in this example consumes a lot of memory and will have failed years later.
And looks like str 32 and map 32 are not affected.

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