Skip to content

[Go] Skip the OTF var data length prefix check for var data absent at the acting version - #1192

Open
slachiewicz wants to merge 1 commit into
aeron-io:masterfrom
slachiewicz:go-otf-absent-var-data-length-check
Open

slachiewicz wants to merge 1 commit into
aeron-io:masterfrom
slachiewicz:go-otf-absent-var-data-length-check

Conversation

@slachiewicz

Copy link
Copy Markdown
Contributor

Go OTF DecodeData checked that a var data length prefix fits in the buffer even for var data added after the acting version, which has no prefix on the wire. A valid older-version message that ends where that field would start panicked with "length too short for data length field".

The check now applies only to var data present at the acting version; absent var data is still reported to OnVarData with length 0. This is the Go counterpart of #1186.

Part of #969.

Verified: TestDecodesOlderVersionMessageEndingBeforeAbsentVarData panics on master and passes here, and TestRejectsMissingLengthOfPresentVarData passes on both; gocode make passes.

… the acting version.

Var data newer than the acting version has no length prefix on the wire, so a valid older message may end where it
would start; check the prefix only for present var data.
@slachiewicz
slachiewicz force-pushed the go-otf-absent-var-data-length-check branch from 96e83eb to 52d45d1 Compare November 19, 2026 21:03
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

Successfully merging this pull request may close these issues.

1 participant