diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-04-22 00:44:01 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-04-22 00:44:01 +0000 |
| commit | 79c38864c27bf997e304fdd602441d49cdabde7d (patch) | |
| tree | 71c29950ea8f01da49399f73b2dd898d4b61b80b | |
| parent | 11a8f538461450b7d8e542c80da0349afede1af2 (diff) | |
| download | lasso-79c38864c27bf997e304fdd602441d49cdabde7d.tar.gz lasso-79c38864c27bf997e304fdd602441d49cdabde7d.tar.xz lasso-79c38864c27bf997e304fdd602441d49cdabde7d.zip | |
Fix potential SEGFAULT of an unknown provider
| -rw-r--r-- | lasso/saml-2.0/logout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lasso/saml-2.0/logout.c b/lasso/saml-2.0/logout.c index ac64e02d..6f41f8dc 100644 --- a/lasso/saml-2.0/logout.c +++ b/lasso/saml-2.0/logout.c @@ -327,6 +327,11 @@ lasso_saml20_logout_build_response_msg(LassoLogout *logout) /* SP initiated logout */ if (logout->initial_remote_providerID) { LassoProvider* remote_provider = lasso_server_get_provider(profile->server, profile->remote_providerID); + + if (! remote_provider) { + return LASSO_PROFILE_ERROR_UNKNOWN_PROVIDER; + } + if (remote_provider->role & LASSO_PROVIDER_ROLE_SP) { lasso_transfer_string(profile->remote_providerID, logout->initial_remote_providerID); |
