Patch for ticket 2405 (mgserver crash in rare occasions)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Patch for ticket 2405 (mgserver crash in rare occasions)

Jackie Ng
Hi All,

I've attached a patch for ticket 2405 (mgserver crash in rare occasions)

http://trac.osgeo.org/mapguide/ticket/2405

If width = 0 causes an access violation and the width itself is an unsigned integer, it means the smallest allowed value has to be 1. So the valid width either has to be 1 or the value of (imaxx - iminx + 1), whichever one is bigger.

This patch forces a valid width by returning the rs_max() of the two above values which is then passed into copy_hline() in AGGRenderer::SetPolyClip().

I see no noticeable changes to my naked eye in any of the rendering test results with this patch.

Please review. Thanks

- Jackie