[mapserver-commits] r9620 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Dec 16 16:40:47 EST 2009


Author: assefa
Date: 2009-12-16 16:40:45 -0500 (Wed, 16 Dec 2009)
New Revision: 9620

Modified:
   trunk/mapserver/mapows.c
Log:
Validate return value before using it

Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c	2009-12-16 21:10:51 UTC (rev 9619)
+++ trunk/mapserver/mapows.c	2009-12-16 21:40:45 UTC (rev 9620)
@@ -1650,7 +1650,7 @@
     const char *oldStyle = msOWSGetEPSGProj( proj, metadata, namespaces, 
                                              bReturnOnlyFirstOne );
 
-    if( strncmp(oldStyle,"EPSG:",5) != 0 )
+    if( oldStyle == NULL || strncmp(oldStyle,"EPSG:",5) != 0 )
         return NULL;
 
     result = strdup("");



More information about the mapserver-commits mailing list