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) 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 * */