krb5 commit: Initialize some magic fields
Greg Hudson
ghudson at mit.edu
Thu Apr 20 14:01:10 EDT 2017
https://github.com/krb5/krb5/commit/9bf1be99a76ca1033b95c791313dbc414389c831
commit 9bf1be99a76ca1033b95c791313dbc414389c831
Author: Martin Kittel <martin.kittel at sap.com>
Date: Thu Mar 16 15:20:11 2017 +0100
Initialize some magic fields
Initialize magic fields where Coverity otherwise detects that the
magic value would be used uninitialized. (The "uses" are always
harmless copying.)
src/kdc/do_as_req.c | 2 ++
src/kdc/do_tgs_req.c | 1 +
src/lib/gssapi/krb5/k5sealv3.c | 2 +-
3 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c
index 712ccb7..611c69c 100644
--- a/src/kdc/do_as_req.c
+++ b/src/kdc/do_as_req.c
@@ -841,6 +841,8 @@ prepare_error_as(struct kdc_request_state *rstate, krb5_kdc_req *request,
kdc_realm_t *kdc_active_realm = rstate->realm_data;
size_t count;
+ errpkt.magic = KV5M_ERROR;
+
if (e_data_in != NULL) {
/* Add a PA-FX-COOKIE to e_data_in. e_data is a shallow copy
* containing aliases. */
diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c
index 547a414..81f9209 100644
--- a/src/kdc/do_tgs_req.c
+++ b/src/kdc/do_tgs_req.c
@@ -909,6 +909,7 @@ prepare_error_tgs (struct kdc_request_state *state,
krb5_data *scratch, *e_data_asn1 = NULL, *fast_edata = NULL;
kdc_realm_t *kdc_active_realm = state->realm_data;
+ errpkt.magic = KV5M_ERROR;
errpkt.ctime = request->nonce;
errpkt.cusec = 0;
diff --git a/src/lib/gssapi/krb5/k5sealv3.c b/src/lib/gssapi/krb5/k5sealv3.c
index 1a5c14c..0038a8e 100644
--- a/src/lib/gssapi/krb5/k5sealv3.c
+++ b/src/lib/gssapi/krb5/k5sealv3.c
@@ -301,7 +301,7 @@ gss_krb5int_unseal_token_v3(krb5_context *contextptr,
int *conf_state, gss_qop_t *qop_state, int toktype)
{
krb5_context context = *contextptr;
- krb5_data plain;
+ krb5_data plain = empty_data();
uint64_t seqnum;
size_t ec, rrc;
int key_usage;
More information about the cvs-krb5
mailing list