Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf - sintXX, fixedXX and sfixedXX array can't be serialized / deserialized #2419

Open
Dogacel opened this issue Aug 23, 2023 · 0 comments

Comments

@Dogacel
Copy link
Contributor

Dogacel commented Aug 23, 2023

Describe the bug

Types repeated fixed32, repeated fixed64, repeated sfixed32 and repeated sfixed64 that are packed/unpacked can't be serialized / deserialized.

Types repeated sint32 and repeated sint64 is deserialized incorrectly.

To Reproduce

    @ProtoNumber(79) @ProtoPacked val packedSint32: List<Int> = emptyList(),
    @ProtoNumber(80) @ProtoPacked val packedSint64: List<Long> = emptyList(),
    @ProtoNumber(81) @ProtoPacked val packedFixed32: List<Int> = emptyList(),
    @ProtoNumber(82) @ProtoPacked val packedFixed64: List<Long> = emptyList(),
    @ProtoNumber(83) @ProtoPacked val packedSfixed32: List<Int> = emptyList(),
    @ProtoNumber(84) @ProtoPacked val packedSfixed64: List<Long> = emptyList(),

Results in

While parsing a protocol message, the input ended unexpectedly in the middle of a field.  This could mean either that the input has been truncated or that an embedded message misreported its own length.

Expected behavior

Should serialize and deserialize correctly.

Environment

  • Kotlin version: 1.9.0
  • Library version: 1.6.1
  • Kotlin platforms: All
@Dogacel Dogacel changed the title Protobuf - fixedXX and sfixedXX array can't be serialized / deserialized Protobuf - sintXX, fixedXX and sfixedXX array can't be serialized / deserialized Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant