From 482121907a046a339ec15c81335d6cd090477c7f Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 13 May 2022 15:42:55 +0200 Subject: [PATCH] Return an error when trying to load a section from 0xC0000000 --- wumsloader/src/module/ModuleDataFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wumsloader/src/module/ModuleDataFactory.cpp b/wumsloader/src/module/ModuleDataFactory.cpp index 98d7b83..c6f763b 100644 --- a/wumsloader/src/module/ModuleDataFactory.cpp +++ b/wumsloader/src/module/ModuleDataFactory.cpp @@ -122,8 +122,8 @@ std::optional> ModuleDataFactory::load(const std::st destination -= 0x10000000; destinations[psec->get_index()] -= 0x10000000; } else if (address >= 0xC0000000) { - destination -= 0xC0000000; - destinations[psec->get_index()] -= 0xC0000000; + DEBUG_FUNCTION_LINE_ERR("Loading section from 0xC0000000 is NOT supported"); + return std::nullopt; } else { DEBUG_FUNCTION_LINE_ERR("Unhandled case"); return std::nullopt;