From 17540b0120a8e1e1e879d3926111fb7c68c365bb Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 11 Nov 2023 23:43:48 +0100 Subject: [PATCH] fix: Prevent Goto from making selections that start before the base address --- plugins/builtin/include/ui/hex_editor.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/builtin/include/ui/hex_editor.hpp b/plugins/builtin/include/ui/hex_editor.hpp index 0ef704a20..36e810d5f 100644 --- a/plugins/builtin/include/ui/hex_editor.hpp +++ b/plugins/builtin/include/ui/hex_editor.hpp @@ -48,6 +48,9 @@ namespace hex::plugin::builtin::ui { if (start > this->m_provider->getBaseAddress() + this->m_provider->getActualSize()) return; + if (start < this->m_provider->getBaseAddress()) + return; + const size_t maxAddress = this->m_provider->getActualSize() + this->m_provider->getBaseAddress() - 1; constexpr static auto alignDown = [](u128 value, u128 alignment) {