-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude NUL characters from OSStrings returned by getsockopt (#2557)
* Exclude NUL characters from OSStrings returned by getsockopt On FreeBSD, getsockopt appends a single NUL to the returned string. On Linux, it pads the entire buffer with NULs. But both of those behaviors may be version-dependent. Adjust GetOsString to handle any number of NUL characters. * fixup: fix MSRV breakage * Fixup: expand the comment
- Loading branch information
Showing
3 changed files
with
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Properly exclude NUL characters from `OSString`s returned by `getsockopt`. |
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