[mapserver-commits] r11782 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Jun 4 12:47:52 EDT 2011
Author: rouault
Date: 2011-06-04 09:47:52 -0700 (Sat, 04 Jun 2011)
New Revision: 11782
Modified:
trunk/mapserver/mapogcfilter.c
Log:
OGC Filter: fix segfault when a ows_varname_type or wfs_varname_type is defined but not a gml_varname_type (complementary fix, #3902)
Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c 2011-06-04 16:32:24 UTC (rev 11781)
+++ trunk/mapserver/mapogcfilter.c 2011-06-04 16:47:52 UTC (rev 11782)
@@ -2391,9 +2391,10 @@
bString = 0;
if (psFilterNode->psRightNode->pszValue)
{
+ const char* pszOFGType;
snprintf(szTmp, sizeof(szTmp), "%s_type", psFilterNode->psLeftNode->pszValue);
- if (msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp) != NULL &&
- (strcasecmp(msOWSLookupMetadata(&(lp->metadata), "G", szTmp), "Character") == 0))
+ pszOFGType = msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp);
+ if (pszOFGType!= NULL && strcasecmp(pszOFGType, "Character") == 0)
bString = 1;
else if (FLTIsNumeric(psFilterNode->psRightNode->pszValue) == MS_FALSE)
bString = 1;
@@ -2621,9 +2622,10 @@
bString = 0;
if (aszBounds[0])
{
+ const char* pszOFGType;
snprintf(szTmp, sizeof(szTmp), "%s_type", psFilterNode->psLeftNode->pszValue);
- if (msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp) != NULL &&
- (strcasecmp(msOWSLookupMetadata(&(lp->metadata), "G", szTmp), "Character") == 0))
+ pszOFGType = msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp);
+ if (pszOFGType!= NULL && strcasecmp(pszOFGType, "Character") == 0)
bString = 1;
else if (FLTIsNumeric(aszBounds[0]) == MS_FALSE)
bString = 1;
@@ -2713,9 +2715,10 @@
bString = 0;
if (aszBounds[0])
{
+ const char* pszOFGType;
snprintf(szTmp, sizeof(szTmp), "%s_type", psFilterNode->psLeftNode->pszValue);
- if (msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp) != NULL &&
- (strcasecmp(msOWSLookupMetadata(&(lp->metadata), "G", szTmp), "Character") == 0))
+ pszOFGType = msOWSLookupMetadata(&(lp->metadata), "OFG", szTmp);
+ if (pszOFGType!= NULL && strcasecmp(pszOFGType, "Character") == 0)
bString = 1;
else if (FLTIsNumeric(aszBounds[0]) == MS_FALSE)
bString = 1;
More information about the mapserver-commits
mailing list