From c39667524a2e6e65f7f4a451b2180a75edd63de7 Mon Sep 17 00:00:00 2001 From: urvashislash Date: Tue, 4 Nov 2025 15:16:02 +0530 Subject: [PATCH 1/2] Fix: limit XRefs table column width to prevent overflow (Issue #3300) --- src/dialogs/XrefsDialog.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/dialogs/XrefsDialog.cpp b/src/dialogs/XrefsDialog.cpp index e93797d0a1..0fbe676e87 100644 --- a/src/dialogs/XrefsDialog.cpp +++ b/src/dialogs/XrefsDialog.cpp @@ -184,6 +184,18 @@ void XrefsDialog::fillRefsForAddress(RVA addr, QString name, bool whole_function // Adjust columns to content qhelpers::adjustColumns(ui->fromTreeWidget, fromModel.columnCount(), 0); qhelpers::adjustColumns(ui->toTreeWidget, toModel.columnCount(), 0); + // Prevent columns from exceeding a maximum width (e.g., 400px) + for (int i = 0; i < ui->fromTreeWidget->header()->count(); ++i) { + int width = ui->fromTreeWidget->columnWidth(i); + if (width > 400) + ui->fromTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + for (int i = 0; i < ui->toTreeWidget->header()->count(); ++i) { + int width = ui->toTreeWidget->columnWidth(i); + if (width > 400) + ui->toTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + // Automatically select the first line if (!qhelpers::selectFirstItem(ui->toTreeWidget)) { @@ -205,6 +217,18 @@ void XrefsDialog::fillRefsForVariable(QString nameOfVariable, RVA offset) // Adjust columns to content qhelpers::adjustColumns(ui->fromTreeWidget, fromModel.columnCount(), 0); qhelpers::adjustColumns(ui->toTreeWidget, toModel.columnCount(), 0); + // Prevent columns from exceeding a maximum width (e.g., 400px) + for (int i = 0; i < ui->fromTreeWidget->header()->count(); ++i) { + int width = ui->fromTreeWidget->columnWidth(i); + if (width > 400) + ui->fromTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + for (int i = 0; i < ui->toTreeWidget->header()->count(); ++i) { + int width = ui->toTreeWidget->columnWidth(i); + if (width > 400) + ui->toTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + // Automatically select the first line if (!qhelpers::selectFirstItem(ui->toTreeWidget)) { From f3c2ac1cb18d8ebacff5c828610e038a85461f64 Mon Sep 17 00:00:00 2001 From: urvashislash Date: Tue, 4 Nov 2025 17:03:33 +0530 Subject: [PATCH 2/2] Fix: adjusted XrefDialog column width issue (#3300) --- external/rizin | 1 + 1 file changed, 1 insertion(+) create mode 160000 external/rizin diff --git a/external/rizin b/external/rizin new file mode 160000 index 0000000000..fb008a68f4 --- /dev/null +++ b/external/rizin @@ -0,0 +1 @@ +Subproject commit fb008a68f413f3266db465193df01159b3dbbb79