Skip to content

Commit

Permalink
[door-lock] Fix the crash when providing null-ed user index (#30276)
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 authored and pull[bot] committed Jan 24, 2024
1 parent b77a50f commit bb79dd6
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 bb79dd6

Please sign in to comment.