summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-13 03:01:17 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-13 03:01:22 +0200
commit8cbf5707df27001212996b6ae8e89e63cc3ddf22 (patch)
treea9cf2906cb2c5bd020ff4a59df099c083b2295c5
parentfbc19ff4227e55e684059ca05618940650ec3883 (diff)
parent07875126a1d81230c1f68b1d3a0721e03b53db62 (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
-rw-r--r--src/mqtt/qmqttconnection.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mqtt/qmqttconnection.cpp b/src/mqtt/qmqttconnection.cpp
index e0b9913..1a08fc9 100644
--- a/src/mqtt/qmqttconnection.cpp
+++ b/src/mqtt/qmqttconnection.cpp
@@ -724,6 +724,7 @@ void QMqttConnection::readBuffer(char *data, quint64 size)
if (Q_UNLIKELY(quint64(m_readBuffer.size() - m_readPosition) < size)) {
qCDebug(lcMqttConnection) << "Reaching out of buffer, protocol violation";
closeConnection(QMqttClient::ProtocolViolation);
+ return;
}
memcpy(data, m_readBuffer.constData() + m_readPosition, size);
m_readPosition += size;