From e94015f8bcc168c9882348d2e8c5a5138ea56676 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 26 Sep 2012 20:52:59 +0200 Subject: fix segfault in saml-2.0/provider.c:load_endpoint_type2 Thanks to Hiromitsu Fujita for the patch. fixes #1582. --- lasso/saml-2.0/provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lasso/saml-2.0') diff --git a/lasso/saml-2.0/provider.c b/lasso/saml-2.0/provider.c index 98561d83..a66ba9f2 100644 --- a/lasso/saml-2.0/provider.c +++ b/lasso/saml-2.0/provider.c @@ -180,7 +180,7 @@ load_endpoint_type2(xmlNode *xmlnode, LassoProvider *provider, LassoProviderRole } indexed_endpoint = checkSaml2MdNode(xmlnode, LASSO_SAML2_METADATA_ELEMENT_ASSERTION_CONSUMER_SERVICE); if (indexed_endpoint) { - if (! xsdUnsignedShortParse(index, &idx)) { + if (! index || ! xsdUnsignedShortParse(index, &idx)) { warning("Invalid AssertionConsumerService, no index set"); goto cleanup; } -- cgit