Add vertexIndex bounds check

This commit is contained in:
Mark Roszko 2021-10-23 15:46:58 +00:00
parent a1adc59cb8
commit 011b4027db
1 changed files with 1 additions and 1 deletions

View File

@ -1714,7 +1714,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 );
}