[prev in list] [next in list] [prev in thread] [next in thread] 

List:       krb5-bugs
Subject:    [krbdev.mit.edu #6697] segfault caused by dlerror returning NULL
From:       ""Arlene Berry" via RT" <rt-comment () krbdev ! mit ! edu>
Date:       2010-04-12 20:39:49
Message-ID: rt-6697-32702.14.1152672749855 () krbdev ! mit ! edu
[Download RAW message or body]

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);


_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic