From: Stephan Bosch Date: Wed, 22 Apr 2020 18:42:26 +0000 (+0200) Subject: lib-http: http-client-request - Fix NULL pointer dereference in http_client_request_c... X-Git-Tag: 2.4.1~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30511dc15c5ccf300db502d6d44e8cdfb609310e;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http-client-request - Fix NULL pointer dereference in http_client_request_continue_payload() Problem found by Coverity. --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index 8c177050a2..22e8d47be3 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -1204,7 +1204,8 @@ http_client_request_continue_payload(struct http_client_request **_req, io_loop_run(client_ioloop); if (req->state == HTTP_REQUEST_STATE_PAYLOAD_OUT && - req->payload_input->eof) { + req->payload_input != NULL && + req->payload_input->eof) { i_stream_unref(&req->payload_input); req->payload_input = NULL; break;