mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
dont assume in-bounds intel pdata ranges
This commit is contained in:
+1
-1
@@ -244,7 +244,7 @@ pe_intel_pdata_off_from_voff__binary_search(String8 data, PE_BinInfo *bin, U64 v
|
|||||||
U64 pdata_count = (range.max - range.min)/sizeof(PE_IntelPdata);
|
U64 pdata_count = (range.max - range.min)/sizeof(PE_IntelPdata);
|
||||||
|
|
||||||
// check if this bin includes a pdata array
|
// check if this bin includes a pdata array
|
||||||
if(pdata_count > 0)
|
if(pdata_count > 0 && 0 <= pdata_off && pdata_off < data.size)
|
||||||
{
|
{
|
||||||
PE_IntelPdata *pdata_array = (PE_IntelPdata*)(data.str + pdata_off);
|
PE_IntelPdata *pdata_array = (PE_IntelPdata*)(data.str + pdata_off);
|
||||||
if(voff >= pdata_array[0].voff_first)
|
if(voff >= pdata_array[0].voff_first)
|
||||||
|
|||||||
Reference in New Issue
Block a user