fix(store): correct unsafe bytes to string conversion in store/internal/conv (#25130)

This commit is contained in:
James Niken
2025-08-11 13:21:05 +00:00
committed by GitHub
parent 28b9b99f57
commit 2f32bdf37f
+1 -1
View File
@@ -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))
}