gavinchou commented on code in PR #67204:
URL: https://github.com/apache/doris/pull/67204#discussion_r3871653287
##########
be/src/load/group_commit/wal/wal_file_reader.cpp:
##########
@@ -83,6 +83,13 @@ Status WalFileReader::read_block(PBlock& block) {
if (_offset >= file_reader->size()) {
return Status::EndOfFile("end of wal file");
}
+ const size_t file_size = file_reader->size();
+ if (file_size - _offset < WalWriter::LENGTH_SIZE) {
Review Comment:
any chance that file_size may be smaller than _offset? => overflow
--
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]