commit 81beb04105b5587a9f5cf03c3954cca77484daf3
parent 93291187f4da4d0041b278a7638e69e8ecbadafc
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Thu, 1 Apr 2021 21:06:29 +0300
websocket_threaded_example: muted compiler warning
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c
@@ -492,7 +492,7 @@ ws_get_accept_value (const char *key, char **val)
return MHD_NO;
}
strncpy (str, key, (WS_KEY_LEN + 1));
- strncat (str, WS_GUID, WS_GUID_LEN);
+ strncpy (str + WS_KEY_LEN, WS_GUID, WS_GUID_LEN + 1);
SHA1Reset (&ctx);
SHA1Input (&ctx, (const unsigned char *) str, WS_KEY_GUID_LEN);
SHA1Result (&ctx, hash);