rdi_from_pdb: fix incorrect bounds checks on procedure frameproc lookup for local location info

This commit is contained in:
Ryan Fleury
2024-06-17 09:34:27 -07:00
parent 794f212501
commit 0b3e3228d1
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ typedef int64_t RDI_S64;
// \"raddbg\0\0\" // \"raddbg\0\0\"
#define RDI_MAGIC_CONSTANT 0x0000676264646172 #define RDI_MAGIC_CONSTANT 0x0000676264646172
#define RDI_ENCODING_VERSION 6 #define RDI_ENCODING_VERSION 7
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//~ Format Types & Functions //~ Format Types & Functions
+1 -1
View File
@@ -62,7 +62,7 @@
""; "";
"// \"raddbg\0\0\""; "// \"raddbg\0\0\"";
"#define RDI_MAGIC_CONSTANT 0x0000676264646172"; "#define RDI_MAGIC_CONSTANT 0x0000676264646172";
"#define RDI_ENCODING_VERSION 6"; "#define RDI_ENCODING_VERSION 7";
""; "";
"////////////////////////////////////////////////////////////////"; "////////////////////////////////////////////////////////////////";
"//~ Format Types & Functions"; "//~ Format Types & Functions";
+2 -2
View File
@@ -2696,7 +2696,7 @@ internal TS_TASK_FUNCTION_DEF(p2r_symbol_stream_convert_task__entry_point)
// rjf: find current procedure's frameproc // rjf: find current procedure's frameproc
CV_SymFrameproc *frameproc = 0; CV_SymFrameproc *frameproc = 0;
if(procedure_num != 0 && procedure_frameprocs[procedure_num-1] != 0 && procedure_num < procedure_frameprocs_count) if(procedure_num != 0 && procedure_num <= procedure_frameprocs_count && procedure_frameprocs[procedure_num-1] != 0)
{ {
frameproc = procedure_frameprocs[procedure_num-1]; frameproc = procedure_frameprocs[procedure_num-1];
} }
@@ -2774,7 +2774,7 @@ internal TS_TASK_FUNCTION_DEF(p2r_symbol_stream_convert_task__entry_point)
// rjf: find current procedure's frameproc // rjf: find current procedure's frameproc
CV_SymFrameproc *frameproc = 0; CV_SymFrameproc *frameproc = 0;
if(procedure_num != 0 && procedure_frameprocs[procedure_num-1] != 0 && procedure_num < procedure_frameprocs_count) if(procedure_num != 0 && procedure_num <= procedure_frameprocs_count && procedure_frameprocs[procedure_num-1] != 0)
{ {
frameproc = procedure_frameprocs[procedure_num-1]; frameproc = procedure_frameprocs[procedure_num-1];
} }