[mapserver-commits] r9388 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Oct 6 15:14:49 EDT 2009
Author: dmorissette
Date: 2009-10-06 15:14:48 -0400 (Tue, 06 Oct 2009)
New Revision: 9388
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwfs.c
Log:
Fixed possible crash with WFS GetFeature when no projection is specified at the map level (#3129)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-10-06 19:03:20 UTC (rev 9387)
+++ trunk/mapserver/HISTORY.TXT 2009-10-06 19:14:48 UTC (rev 9388)
@@ -13,9 +13,14 @@
Current Version (SVN trunk):
----------------------------
+
+- Fixed possible crash with WFS GetFeature when no projection is specified
+ at the map level (#3129)
+
- Fixed anchor point of vertically stacked bar graphs
-- Fixed TEXT property cannot be removed in the CLASS object. PHP/Mapscript (#3063)
+- Fixed TEXT property that cannot be removed in the CLASS object.
+ PHP/Mapscript (#3063)
- Fixed use of minfeaturesize auto with curved labels (#3151)
Modified: trunk/mapserver/mapwfs.c
===================================================================
--- trunk/mapserver/mapwfs.c 2009-10-06 19:03:20 UTC (rev 9387)
+++ trunk/mapserver/mapwfs.c 2009-10-06 19:14:48 UTC (rev 9388)
@@ -1097,7 +1097,6 @@
if (msWFSIsLayerSupported(lp) && lp->name && strcasecmp(lp->name, layers[k]) == 0) {
const char *pszThisLayerSRS;
- char szBuf[32];
rectObj ext;
bLayerFound = MS_TRUE;
@@ -1138,9 +1137,11 @@
/* if the client specifies BBOX or a spatial filter */
if (msOWSGetLayerExtent(map, lp, "FO", &ext) == MS_SUCCESS) {
- sprintf(szBuf, "init=epsg:%.10s", pszMapSRS+5);
+ char szBuf[32];
- if (szBuf != NULL) {
+ if (pszMapSRS != NULL && strncmp(pszMapSRS, "EPSG:", 5) == 0) {
+ sprintf(szBuf, "init=epsg:%.10s", pszMapSRS+5);
+
if (msLoadProjectionString(&(map->projection), szBuf) != 0) {
msSetError(MS_WFSERR, "msLoadProjectionString() failed: %s", "msWFSGetFeature()", szBuf);
return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);
More information about the mapserver-commits
mailing list