iemejia opened a new pull request, #3950: URL: https://github.com/apache/avro/pull/3950
Backport of #3646 (commit `3508f0ec8d`) to `branch-1.12`. `BinaryDecoder::arrayNext()` called `doDecodeLong()` directly instead of `doDecodeItemCount()`, so it mishandled **negative array/map block counts**. Per the Avro spec a negative block count means the absolute value is the item count, followed by a long block byte-size; `doDecodeItemCount()` handles that (and avoids UB when negating `INT64_MIN`), and is already used by `arrayStart()`/`mapStart()`. This is the reason AVRO-4228 was reopened — the fix landed on `main` but was not cherry-picked to `branch-1.12`. Cherry-pick applies cleanly; C++ `CodecTests` (incl. the added negative-block-count test) pass. JIRA: https://issues.apache.org/jira/browse/AVRO-4228 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
