summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-04-27 17:04:24 +0000
committerGreg Hudson <ghudson@mit.edu>2012-04-27 17:04:24 +0000
commitf566fee75f2455d6e5e7ee4fcdf5a0d327808639 (patch)
tree4c2cc4abc2d3dd8b0eeb3c663d5c8cf9ecc33842 /src/lib/krb5
parentce3ba8ba7670b57ffb2b1e2707f0cb443e900b0f (diff)
downloadkrb5-f566fee75f2455d6e5e7ee4fcdf5a0d327808639.tar.gz
krb5-f566fee75f2455d6e5e7ee4fcdf5a0d327808639.tar.xz
krb5-f566fee75f2455d6e5e7ee4fcdf5a0d327808639.zip
Ensure null termination of AFS salts
Use krb5int_copy_data_contents_add0 when copying a pa-pw-salt or pa-afs3-salt value in pa_salt(). If it's an afs3-salt, we're going to throw away the length and use strcspn in krb5int_des_string_to_key, which isn't safe if the value is unterminated. ticket: 2545 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25833 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5')
-rw-r--r--src/lib/krb5/krb/preauth2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index 25fa581d1..924270592 100644
--- a/src/lib/krb5/krb/preauth2.c
+++ b/src/lib/krb5/krb/preauth2.c
@@ -565,7 +565,7 @@ pa_salt(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
tmp = padata2data(*in_padata);
krb5_free_data_contents(context, salt);
- retval = krb5int_copy_data_contents(context, &tmp, salt);
+ retval = krb5int_copy_data_contents_add0(context, &tmp, salt);
if (retval)
return retval;