You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2013/06/26 02:58:41 UTC

svn commit: r1496703 - /santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp

Author: scantor
Date: Wed Jun 26 00:58:41 2013
New Revision: 1496703

URL: http://svn.apache.org/r1496703
Log:
Correct xpointer expression parsing

Modified:
    santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp

Modified: santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp?rev=1496703&r1=1496702&r2=1496703&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/dsig/DSIGReference.cpp Wed Jun 26 00:58:41 2013
@@ -529,10 +529,15 @@ TXFMBase * DSIGReference::getURIBaseTXFM
 			xsecsize_t j = 14, i = 0;
 
 			// Have an ID
-			while (URI[j] != '\'') {
+			while (i < len && URI[j] != '\'') {
 				tmp[i++] = URI[j++];
 			}
+
 			tmp[i] = XERCES_CPP_NAMESPACE_QUALIFIER chNull;
+			
+			if (URI[j] != '\'') {
+				throw XSECException(XSECException::UnsupportedXpointerExpr);	
+			}
 
 			to->setInput(doc, tmp);