reflect: fix Copy of non-pointer array with size > 64bits

This commit is contained in:
Ben Krieger
2024-10-25 12:10:59 -04:00
committed by Damian Gryski
parent e98fea0bba
commit 4f96a50fd0
2 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -1712,7 +1712,7 @@ func buflen(v Value) (unsafe.Pointer, uintptr) {
buf = hdr.data
len = hdr.len
case Array:
if v.isIndirect() {
if v.isIndirect() || v.typecode.Size() > unsafe.Sizeof(uintptr(0)) {
buf = v.value
} else {
buf = unsafe.Pointer(&v.value)