diff options
| author | Simo Sorce <simo@redhat.com> | 2014-06-10 15:31:46 -0400 |
|---|---|---|
| committer | Simo Sorce <simo@redhat.com> | 2014-06-10 15:31:46 -0400 |
| commit | 6c28425d7ea6ccb9ce677ed47126f01699119e88 (patch) | |
| tree | 416fe6b6d52458f505ef7487a2c746ad46fe1030 /lasso | |
| parent | 32e0d501ab14b5fb668c3e144f4115403c8094b8 (diff) | |
| download | lasso-6c28425d7ea6ccb9ce677ed47126f01699119e88.tar.gz lasso-6c28425d7ea6ccb9ce677ed47126f01699119e88.tar.xz lasso-6c28425d7ea6ccb9ce677ed47126f01699119e88.zip | |
Fix potential null dereference errors
Ina number of cases function inputs are not checked for NULL although
values may end up with a NULL value and then they are dereferenced
directly.
Check values in the function (or the caller) if appropriate.
License: MIT
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'lasso')
| -rw-r--r-- | lasso/id-ff/provider.c | 1 | ||||
| -rw-r--r-- | lasso/saml-2.0/profile.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lasso/id-ff/provider.c b/lasso/id-ff/provider.c index 397b5e6e..5344cf39 100644 --- a/lasso/id-ff/provider.c +++ b/lasso/id-ff/provider.c @@ -326,6 +326,7 @@ lasso_provider_get_first_http_method(LassoProvider *provider, const gchar *role_prefix; g_return_val_if_fail(LASSO_IS_PROVIDER(provider), LASSO_HTTP_METHOD_NONE); + g_return_val_if_fail(remote_provider != NULL, LASSO_HTTP_METHOD_NONE); if (provider->private_data->conformance == LASSO_PROTOCOL_SAML_2_0) { return lasso_saml20_provider_get_first_http_method( provider, remote_provider, protocol_type); diff --git a/lasso/saml-2.0/profile.c b/lasso/saml-2.0/profile.c index 64854827..106145a4 100644 --- a/lasso/saml-2.0/profile.c +++ b/lasso/saml-2.0/profile.c @@ -933,6 +933,9 @@ lasso_saml20_profile_build_request_msg(LassoProfile *profile, const char *servic if (url) { lasso_assign_string(((LassoSamlp2RequestAbstract*)profile->request)->Destination, url); + } else { + rc = LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL; + goto cleanup; } switch (method) { |
