mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 09:29:02 +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();
|
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);
|
replyPacketList->writePrimitive(AssetServerError::InvalidByteRange);
|
||||||
qCDebug(networking) << "Bad byte range: " << hexHash << " "
|
qCDebug(networking) << "Bad byte range: " << hexHash << " "
|
||||||
<< byteRange.fromInclusive << ":" << byteRange.toExclusive;
|
<< byteRange.fromInclusive << ":" << byteRange.toExclusive;
|
||||||
|
|
Loading…
Reference in a new issue