-
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.
Make AutoCommissioner::SetCommissioningParameters safer. (#24422)
* Make AutoCommissioner::SetCommissioningParameters safer. Right now, we copy all members of the incoming CommissioningParameters (which might include pointers to buffers that we don't own), then copy some of those external buffers into our own buffers. Then we also hand-copy some scalar values we have already copied. Changes in this PR: * Stop copying scalar values that operator= already handled. * Clear out all buffer references from our copy of CommissioningParameters before we start copying things into our buffers, so we don't end up with dangling pointers. * Add the missing early return when an incoming country code value is too long (used to end up with a dangling pointer). * Address review comment.
- Loading branch information
1 parent
6648ef2
commit 5706a21
Showing
2 changed files
with
70 additions
and
29 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