GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `MessageUnpacker#unpackValue` can cause `NegativeArraySizeException` for large maps · Issue #1042 · msgpack/msgpack-java

MessageUnpacker#unpackValue can cause NegativeArraySizeException for large maps #1042

New issue
Copy link
New issue
Copy link
Open
#1044
Open
MessageUnpacker#unpackValue can cause NegativeArraySizeException for large maps#1042
#1044
Copy link

Description

@Marcono1234
Marcono1234
opened on Oct 29, 2026
Issue body actions

Version

org.msgpack:msgpack-core:0.9.12

Description

Related to #657

The MessageUnpacker methods unpackValue() and unpackValue(Variable) can throw NegativeArraySizeException for large maps because they try to create an array with length size * 2, but that expression can overflow causing the length to become negative.

Expected behavior:

  • Either performing the allocation gradually, and therefore not immediately causing a numeric overflow (see also Consuming a large amount of memory when unpacking huge Array and Map unexpectedly #657)
    (most likely the message is malformed / maliciously crafted and gradual construction fails because the map ends prematurely)
  • Or a MessagePackException to be thrown

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.