]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/mqttd: extract the client id from the correct offset 6334/head
authorDaniel Stenberg <daniel@haxx.se>
Thu, 17 Dec 2020 09:15:31 +0000 (10:15 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 17 Dec 2020 09:15:31 +0000 (10:15 +0100)
Closes #6334

tests/server/mqttd.c

index 1f4344ac0bcf2eefa9fa7ece5b2837342d51db70..aec4a099b6d3a89bad850e76862b6c1f1f9af5e2 100644 (file)
@@ -537,7 +537,7 @@ static curl_socket_t mqttit(curl_socket_t fd)
         logmsg("Too large client id");
         goto end;
       }
-      memcpy(client_id, &buffer[14], payload_len);
+      memcpy(client_id, &buffer[12], payload_len);
       client_id[payload_len] = 0;
 
       logmsg("MQTT client connect accepted: %s", client_id);