mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 14:56:57 +02:00
check both sides of range for invalid byte range
This commit is contained in:
parent
397a29039e
commit
8145e416f9
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ void SendAssetTask::run() {
|
|||
byteRange.toExclusive = file.size();
|
||||
}
|
||||
|
||||
if (file.size() < std::abs(byteRange.toExclusive)) {
|
||||
if (file.size() < std::abs(byteRange.fromInclusive) || file.size() < byteRange.toExclusive) {
|
||||
replyPacketList->writePrimitive(AssetServerError::InvalidByteRange);
|
||||
qCDebug(networking) << "Bad byte range: " << hexHash << " "
|
||||
<< byteRange.fromInclusive << ":" << byteRange.toExclusive;
|
||||
|
|
Loading…
Reference in a new issue