[mapserver-commits] r11329 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Mar 24 09:49:31 EDT 2011
Author: assefa
Date: 2011-03-24 06:49:31 -0700 (Thu, 24 Mar 2011)
New Revision: 11329
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapogcsld.c
Log:
SLD: check for limit on dash arrays (#3772)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-03-24 13:33:32 UTC (rev 11328)
+++ trunk/mapserver/HISTORY.TXT 2011-03-24 13:49:31 UTC (rev 11329)
@@ -15,6 +15,8 @@
Current Version (SVN trunk):
----------------------------
+- SLD: check for limit on dash arrays (#3772)
+
- WMS: Apply sld after bbox and srs have been parsed (#3765)
Version 6.0.0-beta3 (2011-03-23)
Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c 2011-03-24 13:33:32 UTC (rev 11328)
+++ trunk/mapserver/mapogcsld.c 2011-03-24 13:49:31 UTC (rev 11329)
@@ -1242,13 +1242,18 @@
{
int nDash = 0, i;
char **aszValues = NULL;
+ int nMaxDash;
pszDashValue =
msStrdup(psCssParam->psChild->psNext->pszValue);
aszValues = msStringSplit(pszDashValue, ' ', &nDash);
if (nDash > 0)
{
- psStyle->patternlength = nDash;
- for (i=0; i<nDash; i++)
+ nMaxDash = nDash;
+ if (nDash > MS_MAXPATTERNLENGTH)
+ nMaxDash = MS_MAXPATTERNLENGTH;
+
+ psStyle->patternlength = nMaxDash;
+ for (i=0; i<nMaxDash; i++)
psStyle->pattern[i] = atof(aszValues[i]);
msFreeCharArray(aszValues, nDash);
More information about the mapserver-commits
mailing list