Cast dlsym() returns before use
This commit is contained in:
@@ -318,7 +318,7 @@ find_dynamic_method (krb5_context context,
|
|||||||
if (asprintf(&symbol, "hdb_%s_interface", prefix) == -1)
|
if (asprintf(&symbol, "hdb_%s_interface", prefix) == -1)
|
||||||
krb5_errx(context, 1, "out of memory");
|
krb5_errx(context, 1, "out of memory");
|
||||||
|
|
||||||
mso = dlsym(dl, symbol);
|
mso = (struct hdb_so_method *) dlsym(dl, symbol);
|
||||||
if (mso == NULL) {
|
if (mso == NULL) {
|
||||||
krb5_warnx(context, "error finding symbol %s in %s: %s\n",
|
krb5_warnx(context, "error finding symbol %s in %s: %s\n",
|
||||||
symbol, path, dlerror());
|
symbol, path, dlerror());
|
||||||
|
@@ -291,7 +291,7 @@ kadm5_setup_passwd_quality_check(krb5_context context,
|
|||||||
krb5_warnx(context, "failed to open `%s'", check_library);
|
krb5_warnx(context, "failed to open `%s'", check_library);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
version = dlsym(handle, "version");
|
version = (int *) dlsym(handle, "version");
|
||||||
if(version == NULL) {
|
if(version == NULL) {
|
||||||
krb5_warnx(context,
|
krb5_warnx(context,
|
||||||
"didn't find `version' symbol in `%s'", check_library);
|
"didn't find `version' symbol in `%s'", check_library);
|
||||||
@@ -331,7 +331,7 @@ add_verifier(krb5_context context, const char *check_library)
|
|||||||
krb5_warnx(context, "failed to open `%s'", check_library);
|
krb5_warnx(context, "failed to open `%s'", check_library);
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
v = dlsym(handle, "kadm5_password_verifier");
|
v = (struct kadm5_pw_policy_verifier *) dlsym(handle, "kadm5_password_verifier");
|
||||||
if(v == NULL) {
|
if(v == NULL) {
|
||||||
krb5_warnx(context,
|
krb5_warnx(context,
|
||||||
"didn't find `kadm5_password_verifier' symbol "
|
"didn't find `kadm5_password_verifier' symbol "
|
||||||
|
Reference in New Issue
Block a user