From 7a3219d8f99f7bf352c3ddcde2f36e0be8d0c1c3 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 18 Apr 2017 10:37:15 -0700 Subject: [PATCH] force a negative to in ATP byte range to be invalid --- assignment-client/src/assets/SendAssetTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assignment-client/src/assets/SendAssetTask.cpp b/assignment-client/src/assets/SendAssetTask.cpp index 89d59360b9..0222849915 100644 --- a/assignment-client/src/assets/SendAssetTask.cpp +++ b/assignment-client/src/assets/SendAssetTask.cpp @@ -60,7 +60,7 @@ void SendAssetTask::run() { replyPacketList->writePrimitive(messageID); - if (byteRange.toExclusive < byteRange.fromInclusive) { + if (byteRange.toExclusive < byteRange.fromInclusive || byteRange.toExclusive < 0) { replyPacketList->writePrimitive(AssetServerError::InvalidByteRange); } else { QString filePath = _resourcesDir.filePath(QString(hexHash));