gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated: websocket_threaded_example: fix s


From: gnunet
Subject: [libmicrohttpd] branch master updated: websocket_threaded_example: fix static analyzer error
Date: Wed, 25 Aug 2021 19:55:49 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 09c4a229 websocket_threaded_example: fix static analyzer error
09c4a229 is described below

commit 09c4a22975cf02c77c8326e5fdf26a90fa61b5c7
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Aug 25 20:50:07 2021 +0300

    websocket_threaded_example: fix static analyzer error
---
 src/examples/websocket_threaded_example.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/examples/websocket_threaded_example.c 
b/src/examples/websocket_threaded_example.c
index 1502501b..cfb7d750 100644
--- a/src/examples/websocket_threaded_example.c
+++ b/src/examples/websocket_threaded_example.c
@@ -495,7 +495,11 @@ ws_get_accept_value (const char *key, char **val)
   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);
+  if (SHA1_RESULT_SUCCESS != SHA1Result (&ctx, hash))
+  {
+    free (str);
+    return MHD_NO;
+  }
   free (str);
   len = BASE64Encode (hash, SHA1HashSize, val);
   if (-1 == len)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]