[mapserver-dev] msProjectRect may enter to infinite loop
szekerest at gmail.com
Mon Jul 21 07:00:17 PDT 2014
Reprojecting a "very big" rectangle (for example zooming out too far) may
lead to infinite loop in msProjectSegment.
In my case the while loop in mapproject.c line 248-261 causes the issue,
midPoint.y = (subStart.y + subEnd.y) * 0.5;
yields the same result as the initial subEnd.y and since the projection is
failing, the loop condition will never change.
What would be the reasonable solution for this issue?
May I think that returning immediately with an error if the loop condition
is not changing would be ok?
I would also think that bringing back the
former msProjectRectTraditionalEdge instead of msProjectRectAsPolygon (in
msProjectRect) would also be reasonable in some conditions.
msProjectRectAsPolygon may be very inefficient regarding to the performance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-dev