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>
This commit is contained in:
parent
1b955021a5
commit
99376a3c88
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue