summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2016-09-19 08:10:40 (GMT)
committersangwan.kwon <sangwan.kwon@samsung.com>2016-09-19 08:10:40 (GMT)
commit90944743dfa83b3d0db90cc18c3f75ec822b0850 (patch)
tree444cc748949d6cb6578eefce9c604f646dcba0ab
parentbea09ff32460e2342dd8c1fa9106a26dbfdf72d3 (diff)
downloadxmlsec1-90944743dfa83b3d0db90cc18c3f75ec822b0850.zip
xmlsec1-90944743dfa83b3d0db90cc18c3f75ec822b0850.tar.gz
xmlsec1-90944743dfa83b3d0db90cc18c3f75ec822b0850.tar.bz2
* Check null before variable dereferenced Change-Id: Ic0716662fb4c7ef7bc67287bbfaacdd32c77f804 Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-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);