Skip to content

Commit 15313a9

Browse files
committed
Dont try to read 0 structs
1 parent fabaf52 commit 15313a9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/msf/core/post/windows/netapi.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ def read_server_structs(start_ptr, count, domain, server_type)
6868
base = 0
6969
struct_size = 8
7070
hosts = []
71+
72+
if count == 0
73+
return hosts
74+
end
75+
7176
mem = client.railgun.memread(start_ptr, struct_size*count)
7277

7378
count.times do

0 commit comments

Comments
 (0)