diff options
Diffstat (limited to 'cpp/lib')
-rw-r--r-- | cpp/lib/broker/BrokerMessage.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpp/lib/broker/BrokerMessage.cpp b/cpp/lib/broker/BrokerMessage.cpp index 7fa1444a9e..50bf319797 100644 --- a/cpp/lib/broker/BrokerMessage.cpp +++ b/cpp/lib/broker/BrokerMessage.cpp @@ -140,6 +140,7 @@ void Message::decodeContent(Buffer& buffer, u_int32_t chunkSize) u_int64_t expected = expectedContentSize(); if (expected != buffer.available()) { std::cout << "WARN: Expected " << expectedContentSize() << " bytes, got " << buffer.available() << std::endl; + throw Exception("Cannot decode content, buffer not large enough."); } if (!chunkSize || chunkSize > expected) { |