void Polygon::Insert( sal_uInt16 nPos, const Point& rPt )
{
    ImplMakeUnique();

    if( nPos >= mpImplPolygon->mnPoints )
        nPos = mpImplPolygon->mnPoints;

    mpImplPolygon->ImplSplit( nPos, 1 );
    mpImplPolygon->mpPointAry[ nPos ] = rPt;
}
The software writes data past the end, or before the beginning, of the intended buffer.