krb5 commit: Init output parameter of krb5_decode_princ_entry

Greg Hudson ghudson at MIT.EDU
Thu Mar 28 02:49:33 EDT 2013


https://github.com/krb5/krb5/commit/b5212739e7cf800b03f4e072f6446f6d7271176f
commit b5212739e7cf800b03f4e072f6446f6d7271176f
Author: Greg Hudson <ghudson at mit.edu>
Date:   Thu Mar 28 02:46:05 2013 -0400

    Init output parameter of krb5_decode_princ_entry
    
    For easier static analysis, make sure that krb5_decode_princ_entry
    always sets *entry_ptr to a valid entry or NULL.

 src/plugins/kdb/db2/kdb_xdr.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/plugins/kdb/db2/kdb_xdr.c b/src/plugins/kdb/db2/kdb_xdr.c
index 5264963..b587f8e 100644
--- a/src/plugins/kdb/db2/kdb_xdr.c
+++ b/src/plugins/kdb/db2/kdb_xdr.c
@@ -232,6 +232,8 @@ krb5_decode_princ_entry(krb5_context context, krb5_data *content,
     krb5_db_entry       * entry;
     krb5_error_code retval;
 
+    *entry_ptr = NULL;
+
     entry = k5alloc(sizeof(*entry), &retval);
     if (entry == NULL)
         return retval;


More information about the cvs-krb5 mailing list