use m_responseReadState to avoid calling parseResponse() (as a failsafe for malicious/bad server responses)

Signed-off-by: iTrooz <hey@itrooz.fr>
This commit is contained in:
iTrooz
2025-01-25 20:19:19 +01:00
parent 439c565961
commit 7c82cd82d7
2 changed files with 13 additions and 3 deletions

View File

@@ -15,6 +15,10 @@ class McClient : public QObject {
short m_port;
QTcpSocket m_socket;
// 0: did not start reading the response yet
// 1: read the response length, still reading the response
// 2: finished reading the response
unsigned m_responseReadState = 0;
unsigned m_wantedRespLength = 0;
QByteArray m_resp;