[krbdev.mit.edu #6697] segfault caused by dlerror returning NULL
Arlene Berry via RT
rt-comment at krbdev.mit.edu
Mon Apr 12 16:39:49 EDT 2010
We experienced a segfault due to dlerror returning NULL. We suspect it
was due to our application being multi-threaded. We made the change
below to fix it. However, there is a second use of dlerror in the same
file that should probably be fixed as well.
Index: src/linux/krb5/src/util/support/plugins.c
===================================================================
--- src/linux/krb5/src/util/support/plugins.c (revision 43141)
+++ src/linux/krb5/src/util/support/plugins.c (revision 43142)
@@ -267,6 +267,10 @@
handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS);
if (handle == NULL) {
const char *e = dlerror();
+ if (e == NULL)
+ {
+ e = "";
+ }
Tprintf ("dlopen(%s): %s\n", filepath, e);
err = ENOENT; /* XXX */
krb5int_set_error (ep, err, "%s", e);
More information about the krb5-bugs
mailing list