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/5309/head
parent
f844c3397d
commit
58b80a8a52
|
@ -93,7 +93,7 @@ namespace pmx
|
||||||
{
|
{
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
buffer.reserve(size);
|
buffer.resize(size);
|
||||||
stream->read((char*) buffer.data(), size);
|
stream->read((char*) buffer.data(), size);
|
||||||
if (encoding == 0)
|
if (encoding == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue