From be1ae17c61ff6d2ae4a36d3edb36179c1fdd2aa8 Mon Sep 17 00:00:00 2001 From: B3n30 Date: Sat, 7 Jul 2018 18:38:38 +0200 Subject: [PATCH] Fix parameter_size in GetStartupArgument --- src/core/hle/service/apt/apt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 5efd2dd206..5efa92aca0 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -620,12 +620,12 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) { u32 parameter_size = rp.Pop(); StartupArgumentType startup_argument_type = static_cast(rp.Pop()); - if (parameter_size >= 0x300) { + if (parameter_size > 0x300) { + parameter_size = 0x300; LOG_ERROR( Service_APT, "Parameter size is outside the valid range (capped to 0x300): parameter_size={:#010X}", parameter_size); - return; } std::vector parameter(parameter_size, 0);