Out-of-bounds in 3DS read: quick fix for 1.6

1.6.x
Andrew Tribick 2021-11-24 22:54:38 +01:00 committed by ajtribick
parent 154dff1457
commit 2e05e96d7a
1 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,8 @@ static string readString(ifstream& in)
break;
}
s[maxLength - 1] = '\0'; // prevent out-of-bounds read
return string(s);
}