MCPcopy Create free account
hub / github.com/Binject/universal / readCString

Function readCString

loader_darwin.go:300–312  ·  view source on GitHub ↗
(pathFileOffset uint64)

Source from the content-addressed store, hash-verified

298}
299
300func readCString(pathFileOffset uint64) string {
301 path := ""
302 pathSize := 0
303 for {
304 b := (*byte)(unsafe.Pointer(uintptr(pathFileOffset + uint64(pathSize))))
305 if *b == 0 {
306 break
307 }
308 path += string(*b)
309 pathSize++
310 }
311 return path
312}
313
314func isPtrValid(p uintptr) bool {
315 r1, _, err := unix.RawSyscall(unix.SYS_CHMOD, p, 0777, 0)

Callers 1

LoadLibraryDlopenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…