Fix an incorrect length in the new krb5int_c_decrypt_aead_compat
authorGreg Hudson <ghudson@mit.edu>
Wed, 2 Dec 2009 18:10:12 +0000 (18:10 +0000)
committerGreg Hudson <ghudson@mit.edu>
Wed, 2 Dec 2009 18:10:12 +0000 (18:10 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23426 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/krb/aead.c

index 378d8c946869a290f6a2554a291f1be6d9a0ad95..353cd1763b1085b587667bd00446433f302855a7 100644 (file)
@@ -561,7 +561,7 @@ krb5int_c_decrypt_aead_compat(const struct krb5_aead_provider *aead,
 
     iov[1].flags = KRB5_CRYPTO_TYPE_DATA;
     iov[1].data = make_data(output->data, plain_len);
-    memcpy(iov[1].data.data, input->data + header_len, input->length);
+    memcpy(iov[1].data.data, input->data + header_len, plain_len);
 
     /* Use empty padding since tokens don't indicate the padding length. */
     iov[2].flags = KRB5_CRYPTO_TYPE_PADDING;