You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting a uintptr to an unsafe.Pointer I get the error G115: integer overflow conversion uintptr -> unsafe.Pointer, even though these can be safely converted (see https://pkg.go.dev/unsafe#Pointer "A uintptr can be converted to a Pointer.").
Steps to reproduce the behavior
Code sample:
package main
funcmain() {
i:=uintptr(123)
p:=unsafe.Pointer(i)
_=p
}
Summary
When converting a uintptr to an unsafe.Pointer I get the error
G115: integer overflow conversion uintptr -> unsafe.Pointer
, even though these can be safely converted (see https://pkg.go.dev/unsafe#Pointer "A uintptr can be converted to a Pointer.").Steps to reproduce the behavior
Code sample:
gosec version
v2.20.1-0.20240822074752-ab3f6c1c83a0
Go version (output of 'go version')
go version go1.23.0 darwin/amd64
Operating system / Environment
MacOS 14.6.1
Expected behavior
Passes without errors.
Actual behavior
Throws error
G115: integer overflow conversion uintptr -> unsafe.Pointer
The text was updated successfully, but these errors were encountered: