libmicrohttpd

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

commit 470e65c68fd346d8c5367d141f049bbc018ca0fb
parent f2565a62da98879ac60fc17b633a88021f37faa9
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 14 Mar 2022 20:39:50 +0300

Disallowed MHD_SIZE_UNKNOWN for buffer-based responses

Diffstat:
Msrc/microhttpd/response.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -1279,6 +1279,8 @@ MHD_create_response_from_data (size_t size, if ((NULL == data) && (size > 0)) return NULL; + if (MHD_SIZE_UNKNOWN == size) + return NULL; if (NULL == (response = MHD_calloc_ (1, sizeof (struct MHD_Response)))) return NULL; response->fd = -1;