From 90c0a5fb704f5cc01acef9df2c0af69978e078aa Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 20 Mar 2023 14:27:49 +0800 Subject: [PATCH] Avoid UAF in attach process dialog --- ui/attachprocess.cpp | 1 - ui/controlswidget.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/attachprocess.cpp b/ui/attachprocess.cpp index 511486a8..21bacdb7 100644 --- a/ui/attachprocess.cpp +++ b/ui/attachprocess.cpp @@ -352,7 +352,6 @@ AttachProcessDialog::AttachProcessDialog(QWidget* parent, DbgRefexec() != QDialog::Accepted) + AttachProcessDialog dialog(this, m_controller); + if (dialog.exec() != QDialog::Accepted) return; - uint32_t pid = dialog->GetSelectedPid(); + uint32_t pid = dialog.GetSelectedPid(); if (pid == 0) return;