[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/02: digestauth: use pre-calculated URI length to avoi
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/02: digestauth: use pre-calculated URI length to avoid stop at first binary zero |
Date: |
Thu, 23 Jun 2022 21:14:39 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit b41fedd52bfaa1e13f796a94d5e1b0be811ee0b4
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Jun 23 12:15:03 2022 +0300
digestauth: use pre-calculated URI length to avoid stop at first binary zero
---
src/microhttpd/digestauth.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 41a016df..6094ac7d 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -929,6 +929,7 @@ calculate_nonce (uint64_t nonce_time,
const char *rnd,
size_t rnd_size,
const char *uri,
+ size_t uri_len,
const char *realm,
size_t realm_len,
struct DigestAlgorithm *da,
@@ -969,7 +970,7 @@ calculate_nonce (uint64_t nonce_time,
1);
digest_update (da,
(const unsigned char *) uri,
- strlen (uri));
+ uri_len);
digest_update (da,
(const unsigned char *) ":",
1);
@@ -1079,6 +1080,7 @@ calculate_add_nonce (struct MHD_Connection *const
connection,
daemon->digest_auth_random,
daemon->digest_auth_rand_size,
connection->url,
+ connection->url_len,
realm,
realm_len,
da,
@@ -1590,6 +1592,7 @@ digest_auth_check_all_inner (struct MHD_Connection
*connection,
daemon->digest_auth_random,
daemon->digest_auth_rand_size,
connection->url,
+ connection->url_len,
realm,
realm_len,
da,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.