google / google/protobuf.dart

Possible to produce an appropriate error when decoding messages larger than 64 MiB?

Open
#386 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

Hi, thanks for creating this project! It looks like https://github.com/dart-lang/protobuf/blob/cdffe5e612ef0ab7243858a9127e58edef719c98/protobuf/lib/src/protobuf/coded_buffer_reader.dart#L9 causes messages larger than 64 MiB to be silently truncated, resulting in a generic `InvalidProtocolBufferException`. May I ask the reason behind doing so? The 64 MiB magic number cannot be found from any public documentation; I think throwing an exception which explicitly indicates that the message is too big could make this easier to debug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.