[29894] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix krb5int_open_plugin_dirs() error handling

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Mar 29 13:03:54 2017

Date: Wed, 29 Mar 2017 13:03:49 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201703291703.v2TH3n6k010662@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/ec56309e95e37cb3c91bad2a696b9bd094620876
commit ec56309e95e37cb3c91bad2a696b9bd094620876
Author: Martin Kittel <martin.kittel@sap.com>
Date:   Wed Mar 15 17:21:28 2017 +0100

    Fix krb5int_open_plugin_dirs() error handling
    
    In krb5int_open_plugin_dirs(), if constructing filepath fails,
    filepath is set to null but accessed a few lines later.  Add an error
    check before calling krb5int_open_plugin().
    
    ticket: 8565 (new)
    target_version: 1.15-next
    target_version: 1.14-next
    tags: pullup

 src/util/support/plugins.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c
index b0bb2ad..47368be 100644
--- a/src/util/support/plugins.c
+++ b/src/util/support/plugins.c
@@ -592,9 +592,10 @@ krb5int_open_plugin_dirs (const char * const *dirnames,
                     }
                 }
 
-                if (krb5int_open_plugin (filepath, &handle, ep) == 0) {
+                if (!err && krb5int_open_plugin(filepath, &handle, ep) == 0) {
                     err = krb5int_plugin_file_handle_array_add (&h, &count, handle);
-                    if (!err) { handle = NULL; }  /* h takes ownership */
+                    if (!err)
+                        handle = NULL; /* h takes ownership */
                 }
 
                 free(filepath);
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post