Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/crypto/rand/rand_arc4random.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type reader struct {

func (r *reader) Read(b []byte) (n int, err error) {
if len(b) != 0 {
libc_arc4random_buf(unsafe.Pointer(&b[0]), uint(len(b)))
libc_arc4random_buf(unsafe.Pointer(unsafe.SliceData(b)), uint(len(b)))
}
return len(b), nil
}
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/rand/rand_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (r *reader) Read(b []byte) (n int, err error) {
// See for example: https://github.com/golang/go/issues/33542
// For Windows 7 and newer, we might switch to ProcessPrng in the future
// (which is a documented function and might be a tiny bit faster).
ok := libc_RtlGenRandom(unsafe.Pointer(&b[0]), len(b))
ok := libc_RtlGenRandom(unsafe.Pointer(unsafe.SliceData(b)), len(b))
if !ok {
return 0, errRandom
}
Expand Down
2 changes: 1 addition & 1 deletion src/os/osexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func execve(pathname string, argv []string, envv []string) error {
}
env1[len(envv)] = nil

ret, _, err := syscall.Syscall(syscall.SYS_EXECVE, uintptr(unsafe.Pointer(&argv0[0])), uintptr(unsafe.Pointer(&argv1[0])), uintptr(unsafe.Pointer(&env1[0])))
ret, _, err := syscall.Syscall(syscall.SYS_EXECVE, uintptr(unsafe.Pointer(unsafe.SliceData(argv0))), uintptr(unsafe.Pointer(unsafe.SliceData(argv1))), uintptr(unsafe.Pointer(unsafe.SliceData(env1))))
if int(ret) != 0 {
return err
}
Expand Down
Loading