Explorar el Código

service: mii: Limit checks to string size

german77 hace 2 años
padre
commit
bb28f4a0c4
Se han modificado 1 ficheros con 1 adiciones y 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) {