1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

tests/mqttd: extract the client id from the correct offset

Closes #6334
This commit is contained in:
Daniel Stenberg 2020-12-17 10:15:31 +01:00
parent f25112074d
commit 30fc1cc7db
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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);