Fix container overflow in MMD parser

Using reserve, buffer size is not updated. Since data is directly inserted and not using push_pack,
this can lead to a container overflow.
pull/5310/head^2
Alexandre Avenel 2023-11-04 09:59:13 +01:00 committed by Kim Kulling
parent 6004290dde
commit aae93691b9
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ namespace pmx
{
return std::string();
}
buffer.reserve(size);
buffer.resize(size);
stream->read((char*) buffer.data(), size);
if (encoding == 0)
{