mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 08:55:40 +03:00
Client crashes in gnutls psk setup
src/coap_gnutls.c: Correct typo when null terminating username.
This commit is contained in:
1 parent
0158bc46fa
commit
d6562e8b59
1 file changed
+1
-1
+1
-1
@@ -404,7 +404,7 @@ psk_client_callback(gnutls_session_t g_session,
|
||||
*username = gnutls_malloc(identity_len+1);
|
||||
if (*username) {
|
||||
memcpy(*username, identity, identity_len);
|
||||
*username[identity_len] = '\0';
|
||||
username[identity_len] = '\0';
|
||||
}
|
||||
|
||||
key->data = gnutls_malloc(psk_len);
|
||||
|
||||
Reference in new issue
Block a user