aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-03-14 20:39:50 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-03-14 20:39:50 +0300
commit470e65c68fd346d8c5367d141f049bbc018ca0fb (patch)
tree71b6bb70e957b304bfc92bd74335085c2edcbbe0
parentf2565a62da98879ac60fc17b633a88021f37faa9 (diff)
downloadlibmicrohttpd-470e65c68fd346d8c5367d141f049bbc018ca0fb.tar.gz
libmicrohttpd-470e65c68fd346d8c5367d141f049bbc018ca0fb.zip
Disallowed MHD_SIZE_UNKNOWN for buffer-based responses
-rw-r--r--src/microhttpd/response.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index fbee6308..7468a232 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -1279,6 +1279,8 @@ MHD_create_response_from_data (size_t size,
1279 1279
1280 if ((NULL == data) && (size > 0)) 1280 if ((NULL == data) && (size > 0))
1281 return NULL; 1281 return NULL;
1282 if (MHD_SIZE_UNKNOWN == size)
1283 return NULL;
1282 if (NULL == (response = MHD_calloc_ (1, sizeof (struct MHD_Response)))) 1284 if (NULL == (response = MHD_calloc_ (1, sizeof (struct MHD_Response))))
1283 return NULL; 1285 return NULL;
1284 response->fd = -1; 1286 response->fd = -1;