Skip to content

Commit

Permalink
Land #18753, Fix typo in alloc_and_write_wstring
Browse files Browse the repository at this point in the history
The method str_to_uniz_a was being called but does not exist.
The actual method name is str_to_uni_z, this PR fixes that typo.
  • Loading branch information
jheysel-r7 committed Feb 1, 2024
2 parents e21dcf3 + 9391e11 commit 3c46f51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,12 @@ def read_wstring(pointer, length = nil)
#
# Write Unicode strings to memory.
#
# Given a Unicode string, returns a pointer to a null terminated WCHARs array.
# InitializeUnicodeStr(&uStr, sL"string");
# Given a string, returns a pointer to a null terminated WCHARs array.
#
def alloc_and_write_wstring(value)
return nil if value.nil?

alloc_and_write_data(str_to_uniz_a(value))
alloc_and_write_data(str_to_uni_z(value))
end

alias free_wstring free_data
Expand Down

0 comments on commit 3c46f51

Please sign in to comment.