summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 5f04db8..73a01ca 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -298,6 +298,7 @@ bool ResourceAccess::processMessageBuffer()
298{ 298{
299 static const int headerSize = Commands::headerSize(); 299 static const int headerSize = Commands::headerSize();
300 if (d->partialMessageBuffer.size() < headerSize) { 300 if (d->partialMessageBuffer.size() < headerSize) {
301 qWarning() << "command too small";
301 return false; 302 return false;
302 } 303 }
303 304
@@ -306,6 +307,7 @@ bool ResourceAccess::processMessageBuffer()
306 const uint size = *(int*)(d->partialMessageBuffer.constData() + sizeof(int) + sizeof(uint)); 307 const uint size = *(int*)(d->partialMessageBuffer.constData() + sizeof(int) + sizeof(uint));
307 308
308 if (size > (uint)(d->partialMessageBuffer.size() - headerSize)) { 309 if (size > (uint)(d->partialMessageBuffer.size() - headerSize)) {
310 qWarning() << "command too small";
309 return false; 311 return false;
310 } 312 }
311 313