CreateNotificationService should check for null UUID

This commit is contained in:
Thog 2019-06-24 22:05:10 +02:00
parent 80f3744407
commit ffe2f926b2
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,7 @@
namespace Ryujinx.HLE.HOS.Services.Friend
{
static class FriendErr
{
public const int InvalidUuid = 2;
}
}

View file

@ -2,6 +2,8 @@ using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.Utilities;
using System.Collections.Generic;
using static Ryujinx.HLE.HOS.ErrorCode;
namespace Ryujinx.HLE.HOS.Services.Friend
{
class IServiceCreator : IpcService
@ -33,6 +35,11 @@ namespace Ryujinx.HLE.HOS.Services.Friend
{
UInt128 userId = new UInt128(context.RequestData.ReadBytes(0x10));
if (userId.IsNull)
{
return MakeError(ErrorModule.Friends, FriendErr.InvalidUuid);
}
MakeObject(context, new INotificationService(userId));
return 0;