[mapserver-commits] r11019 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Fri Feb 25 00:20:18 EST 2011
Author: sdlime
Date: 2011-02-24 21:20:18 -0800 (Thu, 24 Feb 2011)
New Revision: 11019
Modified:
trunk/mapserver/mapows.c
Log:
Applied patch for #3682.
Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c 2011-02-25 05:18:38 UTC (rev 11018)
+++ trunk/mapserver/mapows.c 2011-02-25 05:20:18 UTC (rev 11019)
@@ -1774,7 +1774,7 @@
const char *oldStyle = msOWSGetEPSGProj( proj, metadata, namespaces,
bReturnOnlyFirstOne );
- if( strncmp(oldStyle,"EPSG:",5) != 0 )
+ if( oldStyle == NULL || !EQUALN(oldStyle,"EPSG:",5) )
return NULL;
result = msStrdup("");
@@ -1785,13 +1785,13 @@
char urn[100];
if( strncmp(tokens[i],"EPSG:",5) == 0 )
- sprintf( urn, "http://www.opengis.net/def/crs/EPSG/0/%s", tokens[i]+5 );
+ snprintf( urn, sizeof(urn), "http://www.opengis.net/def/crs/EPSG/0/%s", tokens[i]+5 );
else if( strcasecmp(tokens[i],"imageCRS") == 0 )
- sprintf( urn, "http://www.opengis.net/def/crs/OGC/0/imageCRS" );
+ snprintf( urn, sizeof(urn), "http://www.opengis.net/def/crs/OGC/0/imageCRS" );
else if( strncmp(tokens[i],"http://www.opengis.net/def/crs/",16) == 0 )
- sprintf( urn, "%s", tokens[i] );
+ snprintf( urn, sizeof(urn), "%s", tokens[i] );
else
- strcpy( urn, "" );
+ strlcpy( urn, "", sizeof(urn) );
if( strlen(urn) > 0 )
{
More information about the mapserver-commits
mailing list