Skip to content

Commit 9d75799

Browse files
committed
Fix LocalAlloc/LocalFree definitions
Railgun should not be using DWORD for pointer sizes because it breaks things on 64-bit sessions. Fixes #18544
1 parent 04361e1 commit 9d75799

File tree

1 file changed

+2
-2
lines changed
  • lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows

1 file changed

+2
-2
lines changed

lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ def self.create_library(constant_manager, library_path = 'kernel32')
23002300
["HANDLE","hResInfo","in"],
23012301
])
23022302

2303-
dll.add_function( 'LocalAlloc', 'DWORD',[
2303+
dll.add_function( 'LocalAlloc', 'HANDLE',[
23042304
["DWORD","uFlags","in"],
23052305
["DWORD","uBytes","in"],
23062306
])
@@ -2318,7 +2318,7 @@ def self.create_library(constant_manager, library_path = 'kernel32')
23182318
["HANDLE","hMem","in"],
23192319
])
23202320

2321-
dll.add_function( 'LocalFree', 'DWORD',[
2321+
dll.add_function( 'LocalFree', 'HANDLE',[
23222322
["HANDLE","hMem","in"],
23232323
])
23242324

0 commit comments

Comments
 (0)