From baa1d7a3e09c8c44e762692023e04dffeaead28c Mon Sep 17 00:00:00 2001 From: Marcin Kajor <98948394+markaj-nordic@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:21:59 +0100 Subject: [PATCH] [door-lock] Fix the crash when providing null-ed user index (#30276) to the HandleLocalLockOperationError method We cannot assume that the valid user index is provided in case of the invalid credential. In fact, the spec in 5.2.5.4.4 says that UserIndex SHALL be null if there is no user id that can be determined for the given operation source. Signed-off-by: Marcin Kajor --- src/app/clusters/door-lock-server/door-lock-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index aa2be853f6277c..d44797ed9d6afe 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -211,7 +211,7 @@ void DoorLockServer::HandleLocalLockOperationError(chip::EndpointId endpointId, HandleWrongCodeEntry(endpointId); - ChipLogProgress(Zcl, "Handling a local Lock Operation Error: [endpoint=%d, user=%d]", endpointId, userId.Value()); + ChipLogProgress(Zcl, "Handling a local Lock Operation Error: [endpoint=%d]", endpointId); } bool DoorLockServer::HandleWrongCodeEntry(chip::EndpointId endpointId)