Skip to content

Commit 5f5ad25

Browse files
committed
Fixing a bug in FunctionParamDumpBPAbstract triggering remote null deref
1 parent 9aaf2c6 commit 5f5ad25

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

windows/debug/breakpoints.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,15 @@ def extract_arguments_32bits(self, cproc, cthread):
126126
def extract_arguments_64bits(self, cproc, cthread):
127127
x = windows.debug.X64ArgumentRetriever()
128128
res = OrderedDict()
129-
for i, (name, type) in enumerate(zip(self.target_params, self.target_args)):
129+
for i, (name, atype) in enumerate(zip(self.target_params, self.target_args)):
130130
value = x.get_arg(i, cproc, cthread)
131-
rt = windows.remotectypes.transform_type_to_remote64bits(type)
131+
rt = windows.remotectypes.transform_type_to_remote64bits(atype)
132132
if issubclass(rt, windows.remotectypes.RemoteValue):
133133
t = rt(value, cproc)
134134
else:
135135
t = rt(value)
136-
if not hasattr(t, "contents"):
136+
137+
if not isinstance(t, (windows.remotectypes.RemotePtr64, windows.remotectypes.RemotePtr32)):
137138
try:
138139
t = t.value
139140
except AttributeError:

0 commit comments

Comments
 (0)