Skip to content

Commit

Permalink
Truncate service names to 8 chars maximum
Browse files Browse the repository at this point in the history
  • Loading branch information
bylaws authored and PixelyIon committed Jul 17, 2020
1 parent 8684e20 commit a3a2cb6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/cpp/skyline/services/sm/IUserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a3a2cb6

Please sign in to comment.