Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unpack "end of buffer reached" error on Windows #278

Description

@shorowit

I'm using v1.4.2 w/ ruby 2.7.2 and have software that is trying to read msgpack files produced by a different application.

On Linux, all of the msgpack files are unpacked successfully, while on Windows, some msgpack files are successfully unpacked while others produce an "end of buffer reached" error. It is 100% reproducible.

I am unpacking the msgpack files like so:

require 'msgpack'
MessagePack.unpack(File.read('foo.msgpack'))

This file is unpacked successfully on both Windows and Linux.

This file is unpacked successfully on Linux but gives an error on Windows:

end of buffer reached in :/ruby/2.7.0/gems/msgpack-1.4.2/lib/msgpack.rb:33:in `full_unpack'
:/ruby/2.7.0/gems/msgpack-1.4.2/lib/msgpack.rb:33:in `load'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions