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

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

krb5 commit: Fix error handling in k5_expand_path_tokens_extra

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sat Jul 12 15:19:33 2014

Date: Sat, 12 Jul 2014 15:19:26 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201407121919.s6CJJQZj021458@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/44b633953c21569b3d1ceb05bda1cbb69ed4d38c
commit 44b633953c21569b3d1ceb05bda1cbb69ed4d38c
Author: Lukas Slebodnik <lslebodn@redhat.com>
Date:   Sat Jun 21 14:59:29 2014 +0200

    Fix error handling in k5_expand_path_tokens_extra
    
    If strdup fails when copying extra tokens, we must terminate the
    argument traversal before returning.
    
    [ghudson@mit.edu: clarified commit message]

 src/lib/krb5/os/expand_path.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lib/krb5/os/expand_path.c b/src/lib/krb5/os/expand_path.c
index 144ccc8..4646c54 100644
--- a/src/lib/krb5/os/expand_path.c
+++ b/src/lib/krb5/os/expand_path.c
@@ -481,6 +481,7 @@ k5_expand_path_tokens_extra(krb5_context context, const char *path_in,
             extra_tokens[i] = strdup(va_arg(ap, const char *));
             if (extra_tokens[i] == NULL) {
                 ret = ENOMEM;
+                va_end(ap);
                 goto cleanup;
             }
         }
_______________________________________________
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