[mapserver-commits] r12669 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Oct 17 18:23:09 EDT 2011
Author: pramsey
Date: 2011-10-17 15:23:09 -0700 (Mon, 17 Oct 2011)
New Revision: 12669
Modified:
trunk/mapserver/mapxmp.c
Log:
Fix Segfault if WEB.METADATA empty and XMP on (#4051)
Modified: trunk/mapserver/mapxmp.c
===================================================================
--- trunk/mapserver/mapxmp.c 2011-10-17 20:49:43 UTC (rev 12668)
+++ trunk/mapserver/mapxmp.c 2011-10-17 22:23:09 UTC (rev 12669)
@@ -90,6 +90,14 @@
/* Check all the keys for "xmp_" start pattern */
key = msFirstKeyFromHashTable(&hash_metadata);
+
+ /* No first key? No license info. */
+ if ( ! key )
+ {
+ rv = MS_FALSE;
+ break;
+ }
+
do
{
/* Found one! Break out and return true */
@@ -172,6 +180,11 @@
/* Check all the keys for "xmp_*_namespace" pattern */
initHashTable(&hash_ns);
key = msFirstKeyFromHashTable(&hash_metadata);
+
+ /* No first key? No license info. We shouldn't get here. */
+ if ( ! key )
+ return MS_SUCCESS;
+
do
{
/* Our regex has one match slot */
More information about the mapserver-commits
mailing list