Nasty off by 1 bug.
authorScott Cantor <cantor.2@osu.edu>
Thu, 17 Mar 2005 05:09:55 +0000 (05:09 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 17 Mar 2005 05:09:55 +0000 (05:09 +0000)
xmlproviders/XMLMetadata.cpp

index eec97ce..9566dd7 100644 (file)
@@ -623,15 +623,15 @@ XMLMetadataImpl::Role::Role(const EntityDescriptor* provider, time_t validUntil,
         if (e->hasAttributeNS(NULL,SHIB_L(errorURL)))
             m_errorURL=toUTF8(e->getAttributeNS(NULL,SHIB_L(errorURL)));
         
-        // Chop the protocol list into pieces...assume any whitespace can appear in between.   
+        // Chop the protocol list into pieces...assume any whitespace can appear in between.
         m_protocolEnumCopy=XMLString::replicate(e->getAttributeNS(NULL,SHIB_L(protocolSupportEnumeration)));
         XMLCh* temp=m_protocolEnumCopy;
         while (temp && *temp) {
             XMLCh* start=temp++;
             while (*temp && !XMLChar1_1::isWhitespace(*temp)) temp++;
-            *temp=chNull;
+            if (*temp)
+                *temp++=chNull;
             m_protocolEnum.push_back(start);
-            temp++;
             while (*temp && XMLChar1_1::isWhitespace(*temp)) temp++;
         }