From 01eeb53af0e88b35e96fe1a28145e6f5541a525e Mon Sep 17 00:00:00 2001 From: misson20000 Date: Sun, 22 Nov 2020 18:00:46 -0800 Subject: [PATCH] Fix out-of-bounds vector write on copy hex string --- source/views/view_hexeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/views/view_hexeditor.cpp b/source/views/view_hexeditor.cpp index 7367c53a0..5b8819a9f 100644 --- a/source/views/view_hexeditor.cpp +++ b/source/views/view_hexeditor.cpp @@ -137,7 +137,7 @@ namespace hex { size_t copySize = (end - start) + 1; - std::string buffer; + std::string buffer(copySize, 0x00); buffer.reserve(copySize + 1); this->m_dataProvider->read(start, buffer.data(), copySize);