Преглед изворни кода

service: mii: Limit checks to string size

german77 пре 2 година
родитељ
комит
bb28f4a0c4
1 измењених фајлова са 1 додато и 1 уклоњено
  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) {