diff options
Diffstat (limited to 'src/examples/websocket_threaded_example.c')
-rw-r--r-- | src/examples/websocket_threaded_example.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c index 4c767f0a..b508198d 100644 --- a/src/examples/websocket_threaded_example.c +++ b/src/examples/websocket_threaded_example.c | |||
@@ -491,8 +491,8 @@ ws_get_accept_value (const char *key, char **val) | |||
491 | { | 491 | { |
492 | return MHD_NO; | 492 | return MHD_NO; |
493 | } | 493 | } |
494 | strncpy (str, key, (WS_KEY_LEN + WS_GUID_LEN + 1)); | 494 | strncpy (str, key, (WS_KEY_LEN + 1)); |
495 | strncat (str, WS_GUID, (WS_GUID_LEN + 1)); | 495 | strncat (str, WS_GUID, WS_GUID_LEN); |
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); |