forked from crc-org/vfkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
golangci-lint v1.60.2 reports potential int overflows when values are downcasted to a 'smaller' int type. This commit addresses these: - it assumes casting an uintptr file descriptor to int will always be fine - it adds a check that `vsockPort uint` is actually lower than `math.MaxUint` - it replaces `strconv.Atoi` with `strconv.ParseUint(_, _, 32)` as the latter guarantees that the returned value won't overflow an uint32. Signed-off-by: Christophe Fergeau <[email protected]>
- Loading branch information
Showing
3 changed files
with
12 additions
and
7 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
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