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 — packString with a string which is larger than 8192 bytes fails to unpack data · Issue #209 · msgpack/msgpack-java

packString with a string which is larger than 8192 bytes fails to unpack data #209

New issue
Copy link
New issue
Copy link
Closed
Closed
packString with a string which is larger than 8192 bytes fails to unpack data#209
Copy link
Assignees
xerial
Milestone
0.7.0-M6

Description

@oza
oza
opened on Mar 13, 2015
Issue body actions

Following test fails:

  def testLargeData : Array[Byte] = {
    val out = new ByteArrayOutputStream()
    val packer = msgpack.newPacker(out)
    val stringLength = 8193

    packer
      .packArrayHeader(2)
      .packString("l" * stringLength)
      .packInt(1)

    packer.close()

    val arr = out.toByteArray
    debug(s"packed: ${toHex(arr)}, size:${arr.length}")

    arr
  }
    "parse message large packed data" taggedAs("unpack") in {
      val arr = testLargeData

      val unpacker = msgpack.newUnpacker(arr)

      var count = 0
      while(unpacker.hasNext) {
        count += 1
        readValue(unpacker)
      }
      count shouldBe 3
      unpacker.getTotalReadBytes shouldBe arr.length
    }

If stringLength is 8192, the test passes.

Activity

  1. xerial
    self-assigned this
    on Mar 16, 2015
  2. xerial
    added this to the 0.7.0-M6 milestone on Mar 16, 2015
  3. xerial
    closed this as completedin #215on Apr 4, 2015
  4. oza commented on Apr 8, 2015

    @oza
    oza
    on Apr 8, 2015
    MemberAuthor
    More actions

    @xerial @komamitsu thanks for your fix!

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

Metadata

Metadata

Assignees

  • @xerial
    xerial

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 0.7.0-M6

    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.