msProjectRect may enter to infinite loop #4961

Closed
szekerest opened this Issue Jul 23, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@szekerest
Member

szekerest commented Jul 23, 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, where

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.

@szekerest szekerest self-assigned this Jul 23, 2014

szekerest added a commit to szekerest/mapserver that referenced this issue Jul 23, 2014

szekerest added a commit that referenced this issue Jul 25, 2014

Merge pull request #4963 from szekerest/issue4961
Break potential infinite loop in msProjectSegment (#4961)

@szekerest szekerest closed this Sep 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment