-
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 unsafe use of strncpy in OpenThread dns-sd code. (#13392)
For the three uses where we are copying data of some computed size into a buffer, add checks that the size is not too big for the buffer (and in particular that we will be able to null-terminate after copying). For the one use where we are copying the entire buffer between two identical-sized buffers: 1) Assert that the target buffer us not smaller than the source buffer. 2) Use CopyString to ensure null-termination even if the source is not null-terminated.
- Loading branch information
1 parent
688d5fb
commit 2173106
Showing
1 changed file
with
16 additions
and
1 deletion.
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