diff options
author | Tom Yu <tlyu@mit.edu> | 2010-04-23 01:30:48 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2010-04-23 01:30:48 +0000 |
commit | 08eec8918ad086d2b9bd612fb1c90b62d298ec0a (patch) | |
tree | 283836fe6c3c3f4ae2a9ff7d7d76f1e981fc7f7d /src/util | |
parent | 33fcef6a991d5697a9e2fa0c52d30349c1e88789 (diff) | |
download | krb5-08eec8918ad086d2b9bd612fb1c90b62d298ec0a.tar.gz krb5-08eec8918ad086d2b9bd612fb1c90b62d298ec0a.tar.xz krb5-08eec8918ad086d2b9bd612fb1c90b62d298ec0a.zip |
Adapted patch from Arlene Berry to handle dlerror() returning a null
pointer.
ticket: 6697
target_version: 1.8.2
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23929 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/support/plugins.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c index fa7b36ebf8..4e9225407a 100644 --- a/src/util/support/plugins.c +++ b/src/util/support/plugins.c @@ -268,6 +268,8 @@ krb5int_open_plugin (const char *filepath, struct plugin_file_handle **h, struct handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS); if (handle == NULL) { const char *e = dlerror(); + if (e == NULL) + e = "unknown failure"; Tprintf ("dlopen(%s): %s\n", filepath, e); err = ENOENT; /* XXX */ krb5int_set_error (ep, err, "%s", e); @@ -335,6 +337,8 @@ krb5int_get_plugin_sym (struct plugin_file_handle *h, sym = dlsym (h->dlhandle, csymname); if (sym == NULL) { const char *e = dlerror (); /* XXX copy and save away */ + if (e == NULL) + e = "unknown failure"; Tprintf ("dlsym(%s): %s\n", csymname, e); err = ENOENT; /* XXX */ krb5int_set_error(ep, err, "%s", e); |