xmlsecurityengine/xmlsec/src/xmlsec_xmldsig.c
branchRCL_3
changeset 16 d10d750052f0
parent 0 e35f40988205
child 24 74f0b3eb154c
--- a/xmlsecurityengine/xmlsec/src/xmlsec_xmldsig.c	Thu Apr 01 00:31:02 2010 +0300
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_xmldsig.c	Tue Apr 27 18:31:15 2010 +0300
@@ -122,7 +122,7 @@
 EXPORT_C
 int 
 xmlSecDSigCtxInitialize(xmlSecDSigCtxPtr dsigCtx, xmlSecKeysMngrPtr keysMngr) {
-    int ret;
+    int ret,ret1;
     
     xmlSecAssert2(dsigCtx != NULL, -1);
     
@@ -165,10 +165,19 @@
     }
 
     /* references lists from SignedInfo and Manifest elements */
-    xmlSecPtrListInitialize(&(dsigCtx->signedInfoReferences), 
+    ret=xmlSecPtrListInitialize(&(dsigCtx->signedInfoReferences), 
 			    xmlSecDSigReferenceCtxListId);
-    xmlSecPtrListInitialize(&(dsigCtx->manifestReferences), 
+    ret1=xmlSecPtrListInitialize(&(dsigCtx->manifestReferences), 
 			    xmlSecDSigReferenceCtxListId);    
+    if(ret<0 ||ret1<0)
+        {
+        xmlSecError(XMLSEC_ERRORS_HERE,
+                NULL,
+                "xmlSecTransformCtxInitialize",
+                XMLSEC_ERRORS_R_XMLSEC_FAILED,
+                XMLSEC_ERRORS_NO_MESSAGE);
+        return(-1);   
+        }
 
     dsigCtx->enabledReferenceUris = xmlSecTransformUriTypeAny;
     return(0);