avoid indexing past the end of the array in makeSimpleFrameMapTable

This commit is contained in:
Joel Dice 2009-06-30 17:35:28 -06:00
parent 562e1e10a8
commit dae7b68d5c

View File

@ -4744,8 +4744,10 @@ makeSimpleFrameMapTable(MyThread* t, Context* context, uint8_t* start,
assert(t, context->traceLogCount + ceiling((i + 1) * mapSize, 32)
<= intArrayLength(t, table));
copyFrameMap(&intArrayBody(t, table, context->traceLogCount), p->map,
mapSize, i * mapSize, p, 0);
if (mapSize) {
copyFrameMap(&intArrayBody(t, table, context->traceLogCount), p->map,
mapSize, i * mapSize, p, 0);
}
}
return table;