From 0245bc108129ffad3a0c457c06bdfabe7b707b38 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 26 Aug 1992 21:49:14 +0000 Subject: [PATCH] Changed to make saber flame less.. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2372 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/decode_kdc.c | 3 ++- src/lib/krb5/krb/encode_kdc.c | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/krb/decode_kdc.c b/src/lib/krb5/krb/decode_kdc.c index ddd53005f..83a5b6e3a 100644 --- a/src/lib/krb5/krb/decode_kdc.c +++ b/src/lib/krb5/krb/decode_kdc.c @@ -76,7 +76,8 @@ OLDDECLARG(krb5_kdc_rep **, dec_rep) krb5_free_kdc_rep(local_dec_rep); return KRB5_WRONG_ETYPE; } - if (retval = krb5_kdc_rep_decrypt_proc(key, 0, local_dec_rep)) { + retval = krb5_kdc_rep_decrypt_proc(key, 0, local_dec_rep); + if (retval) { krb5_free_kdc_rep(local_dec_rep); return(retval); } diff --git a/src/lib/krb5/krb/encode_kdc.c b/src/lib/krb5/krb/encode_kdc.c index 83ccfe9f4..d39ab2569 100644 --- a/src/lib/krb5/krb/encode_kdc.c +++ b/src/lib/krb5/krb/encode_kdc.c @@ -76,7 +76,8 @@ OLDDECLARG(krb5_data **, enc_rep) return KRB5_BADMSGTYPE; } - if (retval = encode_krb5_enc_kdc_rep_part(encpart, &scratch)) { + retval = encode_krb5_enc_kdc_rep_part(encpart, &scratch); + if (retval) { return retval; } @@ -110,22 +111,25 @@ free(dec_rep->enc_part.ciphertext.data); \ dec_rep->enc_part.ciphertext.length = 0; \ dec_rep->enc_part.ciphertext.data = 0;} - if (retval = krb5_process_key(&eblock, client_key)) { + retval = krb5_process_key(&eblock, client_key); + if (retval) { goto clean_encpart; } #define cleanup_prockey() {(void) krb5_finish_key(&eblock);} - if (retval = krb5_encrypt((krb5_pointer) scratch->data, + retval = krb5_encrypt((krb5_pointer) scratch->data, (krb5_pointer) dec_rep->enc_part.ciphertext.data, - scratch->length, &eblock, 0)) { + scratch->length, &eblock, 0); + if (retval) { goto clean_prockey; } /* do some cleanup */ cleanup_scratch(); - if (retval = krb5_finish_key(&eblock)) { + retval = krb5_finish_key(&eblock); + if (retval) { cleanup_encpart(); return retval; } @@ -153,3 +157,5 @@ dec_rep->enc_part.ciphertext.data = 0;} return retval; } + + -- 2.26.2