libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit c063432323f944d9cacc584b72d30dad0e95cb31
parent c0d7d3854a43c920b2c485f4076c0fc7ee0ad754
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Mon, 24 Aug 2026 16:14:27 +0200

mhd_rng: fixed missing include and assert()

Diffstat:
Msrc/mhd2/mhd_rng.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mhd2/mhd_rng.c b/src/mhd2/mhd_rng.c @@ -49,6 +49,8 @@ #include "mhd_sys_options.h" #include "mhd_digest_auth_data.h" +#include "mhd_assert.h" + #include <string.h> #include "sys_errno.h" @@ -98,7 +100,8 @@ mhd_rng (size_t buf_size, { #if defined(MHD_SUPPORT_OPENSSL) /* OpenSSL - RAND_bytes() */ - mhd_assert (buf_size < INT_MAX); + mhd_assert (buf_size == (size_t)(int)buf_size); + mhd_assert (0 < (int)buf_size); if (1 == RAND_bytes ((unsigned char *)buf, (int)buf_size)) return true;