From: Stephan Bosch Date: Thu, 9 Oct 2025 22:43:51 +0000 (+0200) Subject: lib-sasl: sasl-server-request - Assert that client input is only NULL when size is 0 X-Git-Tag: 2.4.2~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a303bc9e18320ffd4b0b2318dc0abf6ce0ff0819;p=thirdparty%2Fdovecot%2Fcore.git lib-sasl: sasl-server-request - Assert that client input is only NULL when size is 0 Fix for scan-build report. --- diff --git a/src/lib-sasl/sasl-server-request.c b/src/lib-sasl/sasl-server-request.c index da65b86df3..6656fd216f 100644 --- a/src/lib-sasl/sasl-server-request.c +++ b/src/lib-sasl/sasl-server-request.c @@ -163,6 +163,8 @@ void sasl_server_request_initial(struct sasl_server_req_ctx *rctx, struct sasl_server_mech_request *mreq = req->mech; const struct sasl_server_mech *mech = mreq->mech; + i_assert(data != NULL || data_size == 0); + if (data == NULL) { e_debug(req->event, "Started interaction without initial response"); @@ -191,6 +193,8 @@ void sasl_server_request_input(struct sasl_server_req_ctx *rctx, struct sasl_server_mech_request *mreq = req->mech; const struct sasl_server_mech *mech = mreq->mech; + i_assert(data != NULL || data_size == 0); + e_debug(req->event, "Client continued interaction with response (size=%zu)", data_size);