[mapguide-commits] r9021 - in trunk/MgDev: . Common/Renderers
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Aug 23 05:05:32 PDT 2016
Author: jng
Date: 2016-08-23 05:05:32 -0700 (Tue, 23 Aug 2016)
New Revision: 9021
Modified:
trunk/MgDev/
trunk/MgDev/Common/Renderers/AGGRenderer.cpp
Log:
Merged revision(s) 9019-9020 from sandbox/adsk/3.1n:
#2736: Server crash when layer contains complicate symbols https://trac.osgeo.org/mapguide/ticket/2736
It is a heap corruption defect. The issue is at line 1792~1814, Common\Renderers\AGGRenderer.cpp. There are minx and maxx which are double. Then we convert them to int. But in some special cases, the converted imaxx will be less than iminx. It results in some memory are corrupted in next operations. To fix the issue, we need to add a check for the values.
........
#2736: Server crash when layer contains complicate symbols https://trac.osgeo.org/mapguide/ticket/2736
Refine submission 9019.
........
Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8658,8705,8710
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/php56x:8975-8985
/sandbox/jng/rfc155:8872-8884
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8869-8871
+ /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8658,8705,8710
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/php56x:8975-8985
/sandbox/jng/rfc155:8872-8884
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8869-8871
Modified: trunk/MgDev/Common/Renderers/AGGRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/AGGRenderer.cpp 2016-08-12 04:15:37 UTC (rev 9020)
+++ trunk/MgDev/Common/Renderers/AGGRenderer.cpp 2016-08-23 12:05:32 UTC (rev 9021)
@@ -1806,9 +1806,12 @@
// clear the affected region of the alpha mask
agg::gray8 cc(0);
- unsigned width = (int)imaxx - (int)iminx + 1;
- for (int y=iminy; y<=imaxy; ++y)
- c()->mask_pixf->copy_hline(iminx, y, width, cc);
+ if (imaxx >= iminx)
+ {
+ unsigned width = (int)imaxx - (int)iminx + 1;
+ for (int y = iminy; y <= imaxy; ++y)
+ c()->mask_pixf->copy_hline(iminx, y, width, cc);
+ }
// render the alpha mask polygon
c()->mask_ren.color(agg::gray8(255));
More information about the mapguide-commits
mailing list