Harden minidump bounds and Windows Qt build
This commit is contained in:
parent
7e1609d880
commit
18b7fba135
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
# include <windows.h>
|
||||
# include <QTimer>
|
||||
# include <QPointer>
|
||||
# include <QWidget>
|
||||
#endif
|
||||
|
||||
QDarkApplication::QDarkApplication(int & argc, char** argv)
|
||||
|
|
|
|||
Loading…
Reference in New Issue