Explorar o código

service: mii: Limit checks to string size

german77 %!s(int64=2) %!d(string=hai) anos
pai
achega
bb28f4a0c4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/hle/service/mii/mii_types.h

+ 1 - 1
src/core/hle/service/mii/mii_types.h

@@ -614,7 +614,7 @@ struct Nickname {
         }
 
         std::size_t index = 1;
-        while (data[index] != 0) {
+        while (index < MaxNameSize && data[index] != 0) {
             index++;
         }
         while (index < MaxNameSize && data[index] == 0) {