mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +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;
|
||||
}
|
||||
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();
|
||||
i++;
|
||||
}
|
||||
QPointF topLeft = getInstructionOffset(db, static_cast<int>(firstLineWithAddr));
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user