[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: Fixed wrong (inverted) asserts
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: Fixed wrong (inverted) asserts |
Date: |
Thu, 05 May 2022 14:07:09 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 1c58c968ced8a3401bd6c5006eb47a92a5998c02
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu May 5 15:06:16 2022 +0300
Fixed wrong (inverted) asserts
---
src/microhttpd/connection.c | 2 +-
src/microhttpd/digestauth.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 0a3dc282..93408eb7 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1189,7 +1189,7 @@ try_ready_chunked_body (struct MHD_Connection *connection,
const size_t data_write_offset
= (size_t) (connection->response_write_position - response->data_start);
/* buffer already ready, use what is there for the chunk */
- mhd_assert (SSIZE_MAX < (response->data_size - data_write_offset));
+ mhd_assert (SSIZE_MAX >= (response->data_size - data_write_offset));
mhd_assert (response->data_size >= data_write_offset);
ret = (ssize_t) (response->data_size - data_write_offset);
if ( ((size_t) ret) > size_to_fill)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index cf4a9256..5232ae10 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -568,7 +568,7 @@ get_nonce_nc_idx (size_t arr_size,
const char *nonce,
size_t noncelen)
{
- mhd_assert (0 == arr_size);
+ mhd_assert (0 != arr_size);
return fast_simple_hash ((const uint8_t *) nonce, noncelen) % arr_size;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.