summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/arch_x86.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/arch_x86.cpp b/arch/x86/arch_x86.cpp
index 26e7cf27..8c446972 100644
--- a/arch/x86/arch_x86.cpp
+++ b/arch/x86/arch_x86.cpp
@@ -4489,11 +4489,12 @@ public:
// Note: info.base contains preferred base address and the base where the image is actually loaded
(void)view;
(void)arch;
- (void)len;
uint64_t* data64 = (uint64_t*)dest;
uint32_t* data32 = (uint32_t*)dest;
uint16_t* data16 = (uint16_t*)dest;
auto info = reloc->GetInfo();
+ if (len < info.size)
+ return false;
uint64_t offset = 0;
if (info.pcRelative)