Fixing a bug in FunctionParamDumpBPAbstract triggering remote null deref

This commit is contained in:
hakril
2025-08-01 09:21:07 +02:00
parent 9aaf2c6f6c
commit 5f5ad2531b
+4 -3
View File
@@ -126,14 +126,15 @@ class FunctionParamDumpBPAbstract(object):
def extract_arguments_64bits(self, cproc, cthread):
x = windows.debug.X64ArgumentRetriever()
res = OrderedDict()
for i, (name, type) in enumerate(zip(self.target_params, self.target_args)):
for i, (name, atype) in enumerate(zip(self.target_params, self.target_args)):
value = x.get_arg(i, cproc, cthread)
rt = windows.remotectypes.transform_type_to_remote64bits(type)
rt = windows.remotectypes.transform_type_to_remote64bits(atype)
if issubclass(rt, windows.remotectypes.RemoteValue):
t = rt(value, cproc)
else:
t = rt(value)
if not hasattr(t, "contents"):
if not isinstance(t, (windows.remotectypes.RemotePtr64, windows.remotectypes.RemotePtr32)):
try:
t = t.value
except AttributeError: