Skip to content

Restore 5bb0f14f now that bug #2025 is fixed.

Sean McBride requested to merge seanm/vtk:5bb0f14-bug2025 into master

Prevent division by 0 by bailing early

If size[0] or size[1] are <= 0, bail early in the same way as is currently done if size is NULL.

Fixes undefined behavior reported by clang's -fsanitize=float-cast-overflow where the resulting NaN is later converted to float (a UB).

Thanks to Dave Cole for the suggested fix.

Merge request reports