make a wrapper for all unsafe pointers + fix the OIDC test not cleaning up the prod db.

This commit is contained in:
KingKDot
2026-07-14 22:08:21 -05:00
parent c8d334ff80
commit 0277c2dbcf
15 changed files with 95 additions and 53 deletions
@@ -10,6 +10,8 @@ import (
"strings"
"syscall"
"unsafe"
"overlord-client/cmd/agent/wininterop"
)
func copyFileCount(src, dst string) (int64, error) {
@@ -250,7 +252,7 @@ func readFileFromHandle(handle uintptr) []byte {
defer procUnmapViewOfFile.Call(baseAddr)
data := make([]byte, fileSize)
copy(data, unsafe.Slice((*byte)(unsafe.Pointer(baseAddr)), fileSize))
copy(data, unsafe.Slice((*byte)(wininterop.Pointer(baseAddr)), fileSize))
return data
}