-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coap_pdu.c: Fix UndefinedBehaviorSanitizer: undefined-behavior
This fixes a reported error in coap_update_token() where a size_t calculation is overflowed (but all ends up with the correct value). Instead of adding an overflowed size_t, now subtract the reversed size_t calculation as appropriate. coap_update_option() and coap_insert_option() similarily updated.
- Loading branch information
Showing
1 changed file
with
24 additions
and
9 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