-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crashes trying to commission bridge-app. (#14898)
There were several bugs here, that were exposed by bridge-app because bridge-app defines an endpoint count that is larger than the number of actually defined endpoints, so there are some endpoint indices that do not actually have an endpoint present at them. Specific issues being fixed: 1) emberAfClusterIndex was using the endpointType at an index without checking that anything is defined there, which crashed with a null-deref. The fix for that is to check the endpoint id (which we later checked anyway) before working with the endpoint type. 2) emberAfClusterIndexInMatchingEndpoints had a similar issue to emberAfClusterIndex, but is unused, so was just removed instead of fixing it. 3) With those issues fixed, we still crashed because the path-expansion iterator would try to expand wildcards across endpoints that were not defined, which led to us trying to emberAfClusterIndex for the invalid-endpoint id, and end up with the same null-deref. The fix there is to actually skip all disabled endpoints (whether defined or not), because we don't want to expand wildcards out to disabled endpoints anyway.
- Loading branch information
1 parent
9ae2a63
commit 41b2347
Showing
4 changed files
with
21 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters