[mapserver-commits] r11783 - branches/branch-6-0/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Jun 4 12:48:33 EDT 2011
Author: rouault
Date: 2011-06-04 09:48:33 -0700 (Sat, 04 Jun 2011)
New Revision: 11783
Modified:
branches/branch-6-0/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: branches/branch-6-0/mapserver/mapogcfilter.c
===================================================================
--- branches/branch-6-0/mapserver/mapogcfilter.c 2011-06-04 16:47:52 UTC (rev 11782)
+++ branches/branch-6-0/mapserver/mapogcfilter.c 2011-06-04 16:48:33 UTC (rev 11783)
@@ -2391,11 +2391,12 @@
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)
+ 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