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
has a list of four unsafe functions. Of those, I think only the last (Pointer) is really a (potential) security concern - Alignof, Offsetof, Sizeof don't (by themselves) bypass the type system or memory safety checks.
I suspect they're in unsafe primarily because they aren't portable - you can get different values when compiling for different platforms. See also golang/go#5602
There are some new-ish unsafe functions that do potentially have security implications:
unsafe.String (go1.20)
unsafe.StringData (go1.20)
unsafe.Slice (go1.17)
unsafe.SliceData (go1.20)
The text was updated successfully, but these errors were encountered:
gosec/rules/unsafe.go
Line 46 in 3952187
unsafe
functions. Of those, I think only the last (Pointer
) is really a (potential) security concern -Alignof
,Offsetof
,Sizeof
don't (by themselves) bypass the type system or memory safety checks.I suspect they're in
unsafe
primarily because they aren't portable - you can get different values when compiling for different platforms. See also golang/go#5602There are some new-ish
unsafe
functions that do potentially have security implications:unsafe.String
(go1.20)unsafe.StringData
(go1.20)unsafe.Slice
(go1.17)unsafe.SliceData
(go1.20)The text was updated successfully, but these errors were encountered: