From d6562e8b5923b0a08cfecebe9abc341f9fede63f Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Sun, 31 Mar 2019 20:33:46 +0100 Subject: [PATCH] Client crashes in gnutls psk setup src/coap_gnutls.c: Correct typo when null terminating username. --- src/coap_gnutls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coap_gnutls.c b/src/coap_gnutls.c index 026f3786..08f3099c 100644 --- a/src/coap_gnutls.c +++ b/src/coap_gnutls.c @@ -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);