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
1 changed files with 1 additions and 1 deletions

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