Skip to content

Commit

Permalink
Strict check for raw buffer length (nickbnf#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Apr 5, 2021
1 parent be27b07 commit b8865b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logdata/src/logdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ std::vector<QString> LogData::getLinesFromFile( LineNumber first_line, LinesCoun
const auto length
= static_cast<LineLength::UnderlyingType>( lineEnd - lineStart - lineFeedWidth );

if ( lineStart + length >= static_cast<qint64>( buffer.size() ) ) {
if ( lineStart + length > static_cast<qint64>( buffer.size() ) ) {
LOG( logWARNING ) << "LogData::getLines not enough data in buffer";
break;
}
Expand Down

0 comments on commit b8865b6

Please sign in to comment.