mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Fix out of bounds memory access. (#1697)
This commit is contained in:
parent
148c7aa9e9
commit
1fd06a26c5
@ -681,13 +681,13 @@ QRectF DisassemblerGraphView::getInstrRect(GraphView::GraphBlock &block, RVA add
|
|||||||
firstLineWithAddr = currentLine;
|
firstLineWithAddr = currentLine;
|
||||||
}
|
}
|
||||||
if (instr.contains(addr)) {
|
if (instr.contains(addr)) {
|
||||||
while (i < db.instrs.size() && db.instrs[i + 1].addr == sequenceAddr) {
|
while (i < db.instrs.size() && db.instrs[i].addr == sequenceAddr) {
|
||||||
currentLine += db.instrs[i].text.lines.size();
|
currentLine += db.instrs[i].text.lines.size();
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
QPointF topLeft = getInstructionOffset(db, static_cast<int>(firstLineWithAddr));
|
QPointF topLeft = getInstructionOffset(db, static_cast<int>(firstLineWithAddr));
|
||||||
return QRectF(topLeft, QSizeF(block.width - 4 * charWidth,
|
return QRectF(topLeft, QSizeF(block.width - 4 * charWidth,
|
||||||
charHeight * int(currentLine - firstLineWithAddr + db.instrs[i].text.lines.size())));
|
charHeight * int(currentLine - firstLineWithAddr)));
|
||||||
}
|
}
|
||||||
currentLine += instr.text.lines.size();
|
currentLine += instr.text.lines.size();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user