mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-09 09:25:41 +00:00
demon/win32: do not assume actual_read is valid after a failed process memory read
This commit is contained in:
@@ -322,7 +322,9 @@ dmn_w32_process_read(HANDLE process, Rng1U64 range, void *dst)
|
||||
{
|
||||
DWORD error = GetLastError();
|
||||
log_infof("'Win32 ReadProcessMemory failure': { [0x%I64x, 0x%I64x), code: %i }\n", range.min, range.max, error);
|
||||
bytes_read += actual_read;
|
||||
// NOTE(rjf): I have discovered that `actual_read` is *NOT* guaranteed to have
|
||||
// a usable value if `ReadProcessMemory` fails!
|
||||
// bytes_read += actual_read;
|
||||
(void)error;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user