Add vertexIndex bounds check

This commit is contained in:
Marek Roszko 2021-10-23 08:13:29 -04:00
parent e30d867439
commit e0ccf553f8
1 changed files with 1 additions and 1 deletions

View File

@ -1715,7 +1715,7 @@ bool DL_Dxf::handleLWPolylineData( DL_CreationInterface* /*creationInterface*
vertices[4 * vertexIndex + (groupCode / 10 - 1)] = toReal( groupValue );
}
}
else if( groupCode==42 && vertexIndex<maxVertices )
else if( groupCode == 42 && vertexIndex < maxVertices && vertexIndex >= 0 )
{
vertices[4 * vertexIndex + 3] = toReal( groupValue );
}