diff --git a/orbis-kernel/src/utils/Logs.cpp b/orbis-kernel/src/utils/Logs.cpp index 8e663cd67..4d464983e 100644 --- a/orbis-kernel/src/utils/Logs.cpp +++ b/orbis-kernel/src/utils/Logs.cpp @@ -19,7 +19,15 @@ void log_class_string::format(std::string &out, const void *arg) { } void log_class_string::format(std::string &out, const void *arg) { - out += *reinterpret_cast(arg); + const char* ptr = *reinterpret_cast(arg); + const auto addr = reinterpret_cast(ptr); + if (addr < 0x10000 || addr > 0x7fff'ffff'ffff) { + out += "{{{{{BAD_ADDR:"; + append_hex(out, addr); + out += "}}}}}"; + return; + } + out += ptr; } template <>