summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xmldsig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xmldsig.c b/src/xmldsig.c
index b22ff2b..ec4338c 100644
--- a/src/xmldsig.c
+++ b/src/xmldsig.c
@@ -2203,7 +2203,9 @@ xmlSecDSigCtxProcessSignedInfoNodeEx(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr node,
dsigCtx->signMethod->operation = dsigCtx->operation;
/* calculate references */
- cur = xmlSecGetNextElementNode(cur->next);
+ if (cur != NULL) {
+ cur = xmlSecGetNextElementNode(cur->next);
+ }
while((cur != NULL) && (xmlSecCheckNodeName(cur, xmlSecNodeReference, xmlSecDSigNs))) {
/* create reference */
dsigRefCtx = xmlSecDSigReferenceCtxCreate(dsigCtx, xmlSecDSigReferenceOriginSignedInfo);