commit 0fd78e5f406161115fa31ba91e02ac7bfbae1dfd
parent 9d6c3deddb486f4c949f5bedbc4695c4c05cae96
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 29 Sep 2021 16:16:48 +0300
build_header_response(): fail early if no write space is available
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -1980,6 +1980,8 @@ build_header_response (struct MHD_Connection *connection)
buf = c->write_buffer;
pos = c->write_buffer_append_offset;
buf_size = c->write_buffer_size;
+ if ((NULL == buf) || (0 == buf_size))
+ return MHD_NO;
/* * The status line * */