Skip to content

Commit df8a63e

Browse files
committed
Fix bug in rpc client response view parsing in 32b process
1 parent 85a40d8 commit df8a63e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

windows/rpc/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def _get_response_effective_data(self, response):
220220
data = response.data[ctypes.sizeof(ALPC_RPC_RESPONSE):]
221221
else:
222222
# Response in view M extract size from PORT_MESSAGE & read data from view
223-
assert response.port_message.u1.s1.TotalLength >= 0x48 # At least 0x20 of data
223+
assert response.port_message.u1.s1.DataLength >= ctypes.sizeof(ALPC_RPC_RESPONSE) # 0x20
224224
rpcdatasize = struct.unpack("<I", response.data[0x18:0x1c])[0] # ctypes.sizeof(ALPC_RPC_RESPONSE)
225225
viewattr = response.view_attribute
226226
assert viewattr.ViewSize >= rpcdatasize

0 commit comments

Comments
 (0)