diff options
author | Theodore Tso <tytso@mit.edu> | 1992-08-26 21:49:14 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1992-08-26 21:49:14 +0000 |
commit | 0245bc108129ffad3a0c457c06bdfabe7b707b38 (patch) | |
tree | 03c8abe6b1460815ed19c195b24320b7a947b24b /src/lib | |
parent | 5ba5349f9ff592e00d8797930fef580947f48745 (diff) | |
download | krb5-0245bc108129ffad3a0c457c06bdfabe7b707b38.zip krb5-0245bc108129ffad3a0c457c06bdfabe7b707b38.tar.gz krb5-0245bc108129ffad3a0c457c06bdfabe7b707b38.tar.bz2 |
Changed to make saber flame less..
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2372 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb5/krb/decode_kdc.c | 3 | ||||
-rw-r--r-- | 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 ddd5300..83a5b6e 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 83ccfe9..d39ab25 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; } + + |