tejalchak commented on code in PR #4937:
URL: https://github.com/apache/cassandra/pull/4937#discussion_r3615943545
##########
src/java/org/apache/cassandra/io/util/ThreadLocalReadAheadBuffer.java:
##########
@@ -104,8 +104,10 @@ public void fill(long position)
{
Block block = getBlock();
ByteBuffer blockBuffer = block.buffer;
- long realPosition = Math.min(channelSize, position);
- int blockNo = (int) (realPosition / bufferSize);
+ if (position >= channelSize)
+ throw new CorruptSSTableException(null, channel.filePath());
Review Comment:
nice find and fix!
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]