mirror of
https://github.com/moparisthebest/curl
synced 2025-01-10 21:48:10 -05:00
mqtt: fix Curl_read() error handling while reading remaining length
Detected by Coverity. CID 1462320. Closes #5274
This commit is contained in:
parent
fa7daafdbc
commit
96c149685b
@ -569,6 +569,8 @@ static CURLcode mqtt_doing(struct connectdata *conn, bool *done)
|
||||
Curl_debug(data, CURLINFO_HEADER_IN, (char *)&byte, 1);
|
||||
pkt[mq->npacket++] = byte;
|
||||
} while((byte & 0x80) && (mq->npacket < 4));
|
||||
if(result)
|
||||
break;
|
||||
mq->remaining_length = mqtt_decode_len(&pkt[0], mq->npacket, NULL);
|
||||
mq->npacket = 0;
|
||||
if(mq->remaining_length) {
|
||||
|
Loading…
Reference in New Issue
Block a user