fix(store): correct unsafe bytes to string conversion in store/internal/conv (#25130)
This commit is contained in:
parent
28b9b99f57
commit
2f32bdf37f
@ -15,5 +15,5 @@ func UnsafeStrToBytes(s string) []byte {
|
||||
// to be used generally, but for a specific pattern to delete keys
|
||||
// from a map.
|
||||
func UnsafeBytesToStr(b []byte) string {
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user