mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
GradientMesh::remove_point_lines (the Mesh tool's Alt-click, object.mesh.deletePoint) only checked that the clicked point exists, then indexed the points above and below or left and right of it by the mesh's rows and columns. A gradient mesh read from a document is not checked against its rows and columns, so one with fewer points than they need (rows 2, columns 1 and 3 points instead of 6) indexes past the end and panics: the engine guard rolls the command back with an internal error, and the web app, which has no guard, aborts. It now returns false for a mesh that isn't valid, as locate (and with it adding mesh lines), the outline and the mesh lines already do, and the command reports that nothing could be deleted. The test Alt-clicks an interior row's point and an interior column's point of two such meshes and checks nothing is deleted and the mesh is unchanged. Reported-by: BS.ehlas.cz