Copilot commented on code in PR #3843:
URL: https://github.com/apache/avro/pull/3843#discussion_r3563711048
##########
lang/c++/impl/BinaryDecoder.cc:
##########
@@ -163,8 +163,11 @@ size_t BinaryDecoder::arrayStart() {
size_t BinaryDecoder::doDecodeItemCount() {
auto result = doDecodeLong();
if (result < 0) {
+ if (result == INT64_MIN) {
+ throw Exception("Invalid negative block count");
+ }
Review Comment:
The new exception message loses useful context compared to nearby decoder
errors (which typically include the offending value). Including the decoded
block count makes corrupted-data debugging easier and helps distinguish this
INT64_MIN guard from other failures.
--
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]