mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 04:10:24 +00:00
Merge branch 'pgrd_overflow' into 'master'
Fix a heap overflow in loadpgrd.cpp See merge request OpenMW/openmw!784
This commit is contained in:
commit
e9ff90f3de
1 changed files with 2 additions and 0 deletions
|
@ -100,6 +100,8 @@ namespace ESM
|
||||||
for(PointList::const_iterator it = mPoints.begin(); it != mPoints.end(); ++it, ++pointIndex)
|
for(PointList::const_iterator it = mPoints.begin(); it != mPoints.end(); ++it, ++pointIndex)
|
||||||
{
|
{
|
||||||
unsigned char connectionNum = (*it).mConnectionNum;
|
unsigned char connectionNum = (*it).mConnectionNum;
|
||||||
|
if (rawConnections.end() - rawIt < connectionNum)
|
||||||
|
esm.fail("Not enough connections");
|
||||||
for (int i = 0; i < connectionNum; ++i) {
|
for (int i = 0; i < connectionNum; ++i) {
|
||||||
Edge edge;
|
Edge edge;
|
||||||
edge.mV0 = pointIndex;
|
edge.mV0 = pointIndex;
|
||||||
|
|
Loading…
Reference in a new issue