1
0
Fork 0

Harden minidump bounds and Windows Qt build

This commit is contained in:
Duncan Ogilvie 2026-07-24 18:03:49 +02:00
parent 7e1609d880
commit 18b7fba135
2 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,14 @@ struct DumpMemoryProvider : MemoryProvider
if(mParser == nullptr)
return false;
auto block = mParser->GetMemBlock(addr);
if(block == nullptr || block->State == MEM_FREE || addr < block->BaseAddress)
return false;
const auto offset = addr - block->BaseAddress;
if(offset > block->DataSize || size > block->DataSize - offset)
return false;
// TODO: support page alignment zeroes (might not be relevant anymore)
auto data = mParser->ReadMemory(addr, size);
if(!data || data->size() != size)

View File

@ -13,6 +13,7 @@
# include <windows.h>
# include <QTimer>
# include <QPointer>
# include <QWidget>
#endif
QDarkApplication::QDarkApplication(int & argc, char** argv)