forked from openthread/ot-commissioner
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[coap] handle zero coap token length
There could be potential out of bound error if the token length in CoAP header is zero (`&aBuf[offset]` could be referring to the next element after the end of the buffer). Note that the added test can pass without the fix in coap.cpp but it's probably because the toolchain has some optimization to avoid such issues...
- Loading branch information
Showing
2 changed files
with
19 additions
and
4 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