Commit 78e43bf1 authored by John van Groningen's avatar John van Groningen
Browse files

in function FillHole prevent read of undefined value in demframe if sp > demsize,

this doesn't cause any problems, but valgrind complains
parent 75e5f7db
......@@ -714,18 +714,17 @@ static void UpdateEntry (int srcoffset, int dstoffset, int sp, int offframe [])
static void FillHole (int sp,int offframe[],int demframe [],int defframe [],int offsize,int demsize)
{
if (sp > demsize)
return;
do {
if (sp > demsize)
return;
else {
int newdef;
newdef = defframe [demframe[sp]];
UpdateEntry (newdef, sp, offsize, offframe);
UpdateFrame (defframe, demframe[sp], sp, offframe);
sp = newdef;
}
} while (offframe[sp] != demframe[sp]);
} while (sp <= demsize && offframe[sp] != demframe[sp]);
}
static void GenStackConversions (int *sp,int demsize,int offframe[],int demframe[],int defframe[],int hole)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment