From 7046d9605a6c95519047a8cb2d6a611534bbe9a4 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 11 Apr 2000 02:12:29 +0000 Subject: [PATCH] (krb5_get_wrapped_length): the padding should be done after having added confounder and checksum git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8168 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/crypto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index f7eecb6a8..36e80f345 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -2278,8 +2278,9 @@ krb5_get_wrapped_length (krb5_context context, size_t blocksize = et->blocksize; size_t res; - res = (data_len + blocksize - 1) / blocksize * blocksize; - res = res + et->confoundersize + et->cksumtype->checksumsize; + res = et->confoundersize + data_len; + res = (res + blocksize - 1) / blocksize * blocksize; + res += et->cksumtype->checksumsize; return res; }