[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: -fix read-only off-by one in 'if
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: -fix read-only off-by one in 'if ( (0 != memcmp (nn->nonce, nonce, noncelen)) || 772 (0 != nn->nonce[noncelen]) )' by making buffer one element larger |
Date: |
Tue, 07 Jun 2022 17:57:29 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new b627fdaf -fix read-only off-by one in 'if ( (0 != memcmp (nn->nonce,
nonce, noncelen)) || 772 (0 != nn->nonce[noncelen]) )' by making buffer
one element larger
b627fdaf is described below
commit b627fdaf25d1db7ae8e35963b5cae882881fc016
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jun 7 17:57:26 2022 +0200
-fix read-only off-by one in 'if ( (0 != memcmp (nn->nonce, nonce,
noncelen)) ||
772 (0 != nn->nonce[noncelen]) )' by making buffer one element larger
---
src/microhttpd/internal.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index f6452b2c..4f03b8fc 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -69,7 +69,7 @@
* pointer to unmodifiable data.
* Must not be used to transform pointers for MHD needs.
*/
-#define _MHD_DROP_CONST(ptr) ((void *)((uintptr_t)((const void *)(ptr))))
+#define _MHD_DROP_CONST(ptr) ((void *) ((uintptr_t) ((const void *) (ptr))))
/**
* @def _MHD_MACRO_NO
@@ -269,7 +269,7 @@ struct MHD_NonceNc
/**
* Nonce value:
*/
- char nonce[MAX_NONCE_LENGTH];
+ char nonce[MAX_NONCE_LENGTH + 1];
};
@@ -848,7 +848,7 @@ enum MHD_HTTP_Version
* Returns boolean 'true' if HTTP version is supported by MHD
*/
#define MHD_IS_HTTP_VER_SUPPORTED(ver) (MHD_HTTP_VER_1_0 <= (ver) && \
- MHD_HTTP_VER_1_2__1_9 >= (ver))
+ MHD_HTTP_VER_1_2__1_9 >= (ver))
/**
* Protocol should be used as HTTP/1.1 protocol.
@@ -857,7 +857,7 @@ enum MHD_HTTP_Version
* https://datatracker.ietf.org/doc/html/rfc7230#section-2.6
*/
#define MHD_IS_HTTP_VER_1_1_COMPAT(ver) (MHD_HTTP_VER_1_1 == (ver) || \
- MHD_HTTP_VER_1_2__1_9 == (ver))
+ MHD_HTTP_VER_1_2__1_9 == (ver))
/**
* The HTTP method.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: -fix read-only off-by one in 'if ( (0 != memcmp (nn->nonce, nonce, noncelen)) || 772 (0 != nn->nonce[noncelen]) )' by making buffer one element larger,
gnunet <=