commit 1dafa07eb3b89572311a4b2c6a8a44335a96989c
parent ada8dc689eee7d4d096d6cafd23962b938343629
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 16 Aug 2021 10:33:31 +0300
connection.c: added check to mute static analyzer error
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -1080,6 +1080,12 @@ try_ready_chunked_body (struct MHD_Connection *connection,
}
else
{
+ if (NULL == response->crc)
+ { /* There is no way to reach this code */
+ CONNECTION_CLOSE_ERROR (connection,
+ _ ("No callback for the chunked data."));
+ return MHD_NO;
+ }
ret = response->crc (response->crc_cls,
connection->response_write_position,
&connection->write_buffer[max_chunk_hdr_len],