From c7d3e3c1a6a6e01265d63e9beb0b0e2eba2bc356 Mon Sep 17 00:00:00 2001 From: silverf0x Date: Wed, 28 Aug 2019 21:19:23 +0200 Subject: [PATCH] Fix #36: UAF in InterfacesWidget_C::InterfaceSelected(const QModelIndex& Index) results in empty interface properties --- RpcView/InterfacesWidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RpcView/InterfacesWidget.cpp b/RpcView/InterfacesWidget.cpp index d303d9f..cd1e522 100644 --- a/RpcView/InterfacesWidget.cpp +++ b/RpcView/InterfacesWidget.cpp @@ -48,11 +48,13 @@ void InterfacesWidget_C::InterfaceSelected(const QModelIndex& Index) { QStringList PidStringList; QStringList VersionStringList; + QByteArray UuidStringARef; RPC_IF_ID RpcIfId; UCHAR* pUuidStringA; QString PidString = pProxyModel->data( pProxyModel->index(Index.row(), Column_Pid) ).toString(); - pUuidStringA = (UCHAR*)pProxyModel->data( pProxyModel->index(Index.row(), Column_Uuid) ).toString().toLatin1().data(); + UuidStringARef = pProxyModel->data(pProxyModel->index(Index.row(), Column_Uuid)).toString().toLatin1(); + pUuidStringA = (UCHAR*)UuidStringARef.data(); QString VersionString = pProxyModel->data( pProxyModel->index(Index.row(), Column_Version) ).toString(); VersionStringList = VersionString.split(".", QString::SkipEmptyParts, Qt::CaseSensitive);