gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/13: digestauth: simplified overflow check


From: gnunet
Subject: [libmicrohttpd] 01/13: digestauth: simplified overflow check
Date: Mon, 16 May 2022 20:14:50 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 393c5a451cab99ef5fdb9487434e4ecfb7864b1f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon May 16 15:12:08 2022 +0300

    digestauth: simplified overflow check
---
 src/microhttpd/digestauth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 26f972b8..cda8b478 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -671,7 +671,7 @@ check_nonce_nc (struct MHD_Connection *connection,
   mod = daemon->nonce_nc_size;
   if (0 == mod)
     return MHD_DAUTH_NONCENC_STALE;  /* no array! */
-  if (nc + 64 < nc)
+  if (nc >= UINT64_MAX - 64)
     return MHD_DAUTH_NONCENC_STALE;  /* Overflow, unrealistically high value */
 
   nn = &daemon->nnc[get_nonce_nc_idx (mod, nonce, noncelen)];

-- 
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]