mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Fix a heap overflow in loadpgrd.cpp
This commit is contained in:
parent
68ddde84fe
commit
5f65583a3a
@ -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…
x
Reference in New Issue
Block a user