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 <marcin.kajor@nordicsemi.no>
  • Loading branch information
markaj-nordic authored Nov 13, 2023
1 parent 33441cb commit baa1d7a
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 baa1d7a

Please sign in to comment.