From 78250730d93e47c37e14b6ac7dc41335a26c2b80 Mon Sep 17 00:00:00 2001 From: Marcin Kajor Date: Tue, 7 Nov 2023 12:22:18 +0100 Subject: [PATCH] [nrf fromtree] [door-lock] Fix the crash when providing null-ed user index 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 1be72dd1f8..6463d35430 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)