maedhroz commented on code in PR #2451:
URL: https://github.com/apache/cassandra/pull/2451#discussion_r1245708632
##########
src/java/org/apache/cassandra/index/sai/disk/v1/postings/PostingsReader.java:
##########
@@ -334,7 +329,10 @@ private void advanceOnePosition(long nextPosting)
private void reBuffer() throws IOException
{
long pointer = summary.offsets.get(blockIndex);
-
+ if (pointer < 4) {
+ // the first 4 bytes must be CODEC_MAGIC
+ throw new CorruptIndexException(String.format("Invalid block
offset %d for postings block idx %d", pointer, blockIndex), input);
+ }
Review Comment:
Quick, put the first `{` on a new line!
--
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]