From d6fadd44e95f7f22a2806aeb9cc494023f758e54 Mon Sep 17 00:00:00 2001 From: Marcin Kajor Date: Tue, 7 Nov 2023 12:22:18 +0100 Subject: [PATCH] [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 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)