Skip to content

Commit

Permalink
[door-lock] Fix the crash when providing null-ed user index
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
markaj-nordic committed Nov 13, 2023
1 parent 7ccfa74 commit d6fadd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6fadd4

Please sign in to comment.