From ad71a51fef925779f5ae30b597efb9979607b693 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 19 Apr 2021 17:04:24 +0800 Subject: render non-member access to type on a new line add Python API for retrieving all type fields referenced by code change m_updatesRequired to std::atomic_bool fix potential UAF after calling AnalysisCompletionEvent::Cancel() --- ui/typeview.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/typeview.h b/ui/typeview.h index b9dab368..87f64ae2 100644 --- a/ui/typeview.h +++ b/ui/typeview.h @@ -28,7 +28,8 @@ enum BINARYNINJAUIAPI TypeDefinitionLineType EnumDefinitionLineType, EnumMemberLineType, EnumDefinitionEndLineType, - PaddingLineType + PaddingLineType, + UndefinedXrefLineType }; struct BINARYNINJAUIAPI TypeDefinitionLine @@ -113,7 +114,8 @@ class BINARYNINJAUIAPI TypeView: public QAbstractScrollArea, public View, public std::map> m_typeLines; std::vector m_types; - bool m_updatesRequired; + BinaryNinja::Ref m_completionEvent = nullptr; + std::atomic_bool m_updatesRequired; QTimer* m_updateTimer; Qt::KeyboardModifiers m_ctrl, m_command; @@ -208,7 +210,9 @@ public: virtual ArchitectureRef getOrAskForArchitecture(); - static std::vector getLinesForType(const std::string& name, const std::string& varName, size_t index, TypeRef type, TypeRef parent, int paddingCols); + static std::vector getLinesForType(const std::string& name, + const std::string& varName, size_t index, TypeRef type, TypeRef parent, BinaryViewRef data, + int paddingCols); protected: virtual void resizeEvent(QResizeEvent* event) override; -- cgit v1.3.1