1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 03:15:32 +00:00

Fix a heap overflow in loadpgrd.cpp

This commit is contained in:
jvoisin 2021-04-30 12:04:41 +00:00 committed by Alexei Dobrohotov
parent 68ddde84fe
commit 5f65583a3a

View file

@ -100,6 +100,8 @@ namespace ESM
for(PointList::const_iterator it = mPoints.begin(); it != mPoints.end(); ++it, ++pointIndex)
{
unsigned char connectionNum = (*it).mConnectionNum;
if (rawConnections.end() - rawIt < connectionNum)
esm.fail("Not enough connections");
for (int i = 0; i < connectionNum; ++i) {
Edge edge;
edge.mV0 = pointIndex;