Przeglądaj źródła

service: mii: Limit checks to string size

german77 2 lat temu
rodzic
commit
bb28f4a0c4
1 zmienionych plików z 1 dodań i 1 usunięć
  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) {