diff options
Diffstat (limited to 'src/examples/websocket_threaded_example.c')
-rw-r--r-- | src/examples/websocket_threaded_example.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c index b508198d..1502501b 100644 --- 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) | |||
492 | return MHD_NO; | 492 | return MHD_NO; |
493 | } | 493 | } |
494 | strncpy (str, key, (WS_KEY_LEN + 1)); | 494 | strncpy (str, key, (WS_KEY_LEN + 1)); |
495 | strncat (str, WS_GUID, WS_GUID_LEN); | 495 | strncpy (str + WS_KEY_LEN, WS_GUID, WS_GUID_LEN + 1); |
496 | SHA1Reset (&ctx); | 496 | SHA1Reset (&ctx); |
497 | SHA1Input (&ctx, (const unsigned char *) str, WS_KEY_GUID_LEN); | 497 | SHA1Input (&ctx, (const unsigned char *) str, WS_KEY_GUID_LEN); |
498 | SHA1Result (&ctx, hash); | 498 | SHA1Result (&ctx, hash); |