Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.
This repository was archived by the owner on May 12, 2026. It is now read-only.

Message.decode ignores length argument #78

Open

Description

@IjzerenHein

Hi,

First of all, I'd like to say, awesome library, kudos any many thanks for writing this 😃 😃 😃

I think I've come across a bug when decoding a message. According to the documentation I can pass in a length to the Message.decode function. However, the length is ignored and instead it tries to decode the whole buffer.

This is the code:

image

As you can see, the length argument is not used anywhere in this function, nor passed along to T.decode(). This seems like a bug to me. Or am I missing something here?

Cheers,
Hein

Activity

  1. IjzerenHein commented on Sep 11, 2016

    @IjzerenHein
    Author

    Oops, I accidentally put this bug report in the wrong repo, should have been the Protobuf repo. My bad, sorry. I just found out that it's a duplicate of protobufjs/protobuf.js#436 and it has actually been fixed on the master of protobuf, but not yet on the 5.0.1 npm version.
    Are there any plans of updating protobuf on npm?
    Cheers

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