From: Daniel Stenberg Date: Thu, 17 Dec 2020 09:15:31 +0000 (+0100) Subject: tests/mqttd: extract the client id from the correct offset X-Git-Tag: curl-7_75_0~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6334%2Fhead;p=thirdparty%2Fcurl.git tests/mqttd: extract the client id from the correct offset Closes #6334 --- diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c index 1f4344ac0b..aec4a099b6 100644 --- a/tests/server/mqttd.c +++ b/tests/server/mqttd.c @@ -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);