Skip to content

Commit 02cca81

Browse files
committed
Switch LocalAlloc to 64bit
1 parent f6f8006 commit 02cca81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/kernel32/kernel32.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const (
1919
LocalAlloc_LPTR uint32 = 0x40
2020
)
2121

22-
func LocalAlloc(length uint32) (ptr uintptr, err error) {
22+
func LocalAlloc(length uint64) (ptr uintptr, err error) {
2323
ptr, _, lastError := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(LocalAlloc_LPTR), uintptr(length), 0)
2424
err = errors.NotNill(ptr, lastError)
2525
return

pkg/ntdll/ntdll.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func MemcpySrcC(dest []byte, src uintptr, size uint64) {
3535

3636
func MemcpyLocalAlloc(data []byte) (ptr uintptr, err error) {
3737

38-
size := uint32(len(data))
38+
size := uint64(len(data))
3939
ptr, err = kernel32.LocalAlloc(size)
4040
if err != nil {
4141
return

0 commit comments

Comments
 (0)