Skip to content

Commit

Permalink
Segfault resolved when parsing srsName in WFS spatial filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkofahl committed Apr 15, 2013
1 parent a7841c3 commit 3419059
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mapogcfiltercommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,14 @@ char *FLTGetSpatialComparisonCommonExpression(FilterEncodingNode *psNode, layerO

if (psTmpShape) {
if( lp->projection.numargs > 0) {
if (psNode->pszSRS)
msInitProjection(&sProjTmp);
if (psNode->pszSRS && FLTParseEpsgString(psNode->pszSRS, &sProjTmp)) {
msProjectShape(&sProjTmp, &lp->projection, psTmpShape);
msFreeProjection(&sProjTmp);
} else if (lp->map->projection.numargs > 0)
msProjectShape(&lp->map->projection, &lp->projection, psTmpShape);
if (psNode->pszSRS)
msFreeProjection(&sProjTmp);
}
/* ==================================================================== */
/* use within for bbox. Not Disjoint does not work. */
Expand Down

0 comments on commit 3419059

Please sign in to comment.