aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-09-29 16:16:48 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-03 20:50:46 +0300
commit0fd78e5f406161115fa31ba91e02ac7bfbae1dfd (patch)
tree3ea23fc9212a7ad88dfb0b90e80099a744f6c201 /src
parent9d6c3deddb486f4c949f5bedbc4695c4c05cae96 (diff)
downloadlibmicrohttpd-0fd78e5f406161115fa31ba91e02ac7bfbae1dfd.tar.gz
libmicrohttpd-0fd78e5f406161115fa31ba91e02ac7bfbae1dfd.zip
build_header_response(): fail early if no write space is available
Diffstat (limited to 'src')
-rw-r--r--src/microhttpd/connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 3e6a4ba0..925f9df5 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1980,6 +1980,8 @@ build_header_response (struct MHD_Connection *connection)
1980 buf = c->write_buffer; 1980 buf = c->write_buffer;
1981 pos = c->write_buffer_append_offset; 1981 pos = c->write_buffer_append_offset;
1982 buf_size = c->write_buffer_size; 1982 buf_size = c->write_buffer_size;
1983 if ((NULL == buf) || (0 == buf_size))
1984 return MHD_NO;
1983 1985
1984 /* * The status line * */ 1986 /* * The status line * */
1985 1987