Closed elagergren-spideroak closed 3 years ago
The only valid way of converting an unsafe.Pointer to a slice is with reflect.SliceHeader.
unsafe.Pointer
reflect.SliceHeader
The struct type used inside getBytes is not guaranteed to work across Go versions.
getBytes
https://github.com/awnumar/memguard/blob/master/core/auxiliary.go#L18-L26
The only valid way of converting an
unsafe.Pointer
to a slice is withreflect.SliceHeader
.The struct type used inside
getBytes
is not guaranteed to work across Go versions.https://github.com/awnumar/memguard/blob/master/core/auxiliary.go#L18-L26