Skip to content

JavaBinarySerializer.readExternal ignores ObjectInput.read return — partial reads corrupt records #4329

Closed

Description

@ruispereira

Affected version: 26.4.2 (confirmed still present in 26.5.1)
Component: com.arcadedb.serializer.JavaBinarySerializer

Summary

ObjectInput.read(byte[]) is allowed to return fewer than the array length; the documented "fill the buffer" method is readFully.
ArcadeDB calls in.read(array) and ignores the return.

Code

engine/com/arcadedb/serializer/JavaBinarySerializer.java:128–129

final byte[] array = new byte[propertySize];
in.read(array);                                         // may return short

Impact

Short reads (rare but possible across compressed / networked inputs) produce garbage property bytes; the next property is read from the wrong offset, corrupting the whole record. Compounds with #9.

Suggested fix

in.readFully(array);

Activity

  1. self-assigned this
    on May 25, 2026
  2. added theissue type on May 26, 2026
  3. added this to the 26.6.1 milestone on May 26, 2026
  4. added 2 commits that reference this issue on May 27, 2026
  5. added a commit that references this issue on Jun 28, 2026
  6. added a commit that references this issue on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions