libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

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

digestauth: simplified overflow check

Diffstat:
Msrc/microhttpd/digestauth.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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)];