bachmanity1 opened a new pull request, #13261: URL: https://github.com/apache/kafka/pull/13261
After reading data of type `BYTES`, `COMPACT_BYTES`, `NULLABLE_BYTES` or `COMPACT_NULLABLE_BYTES` returned `ByteBuffer` might have a capacity that is larger than its limit, thus these data types may access bytes that lies beyond its size by increasing limit of the returned `ByteBuffer`. I guess this is not very critical but I think it would be good to restrict increasing limit of the returned `ByteBuffer` by making its capacity strictly equal to its limit. I think someone might unintentionally mishandle these data types and accidentally mess up data in the `ByteBuffer` from which they were read. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org