Truncate service names to 8 chars maximum

This commit is contained in:
Billy Laws 2020-07-10 13:58:54 +01:00 committed by ◱ PixelyIon
parent 8684e20a29
commit a3a2cb682e

View File

@ -13,6 +13,7 @@ namespace skyline::service::sm {
void IUserInterface::GetService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
std::string serviceName(request.PopString());
serviceName.resize(std::min(8UL, serviceName.size()));
if (serviceName.empty()) {
response.errorCode = constant::status::ServiceInvName;