Copilot commented on code in PR #3859:
URL: https://github.com/apache/avro/pull/3859#discussion_r3568265156


##########
lang/c++/impl/BinaryDecoder.cc:
##########
@@ -153,7 +203,7 @@ void BinaryDecoder::skipFixed(size_t n) {
 }

Review Comment:
   `BinaryDecoder::skipFixed()` can be called as the first operation after 
`init()`. At that point `StreamReader::reset()` has set `next_`/`end_` to 
`nullptr`, and `StreamReader::skipBytes()` performs `end_ - next_`, which is 
undefined for null pointers. Avoid passing control to `skipBytes()` in that 
state (and while here, reuse `checkAvailableBytes()` for memory-backed streams).



-- 
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]

Reply via email to