gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 231/264: mqtt: fix Curl_read() error handling while reading rema


From: gnunet
Subject: [gnurl] 231/264: mqtt: fix Curl_read() error handling while reading remaining length
Date: Thu, 30 Apr 2020 16:08:54 +0200

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 96c149685bff881b30493acf0fed1fc4cd5520ee
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Apr 20 17:03:18 2020 +0200

    mqtt: fix Curl_read()  error handling while reading remaining length
    
    Detected by Coverity. CID 1462320.
    
    Closes #5274
---
 lib/mqtt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/mqtt.c b/lib/mqtt.c
index 35c1b3e83..44433361b 100644
--- a/lib/mqtt.c
+++ b/lib/mqtt.c
@@ -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) {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]