From 1d35aa3ab889a73fb3b805f991b635c61183c7d9 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 17 Oct 1999 06:41:35 +0000 Subject: [PATCH] (krb5_get_wrapped_length): more correct calculation git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7150 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index 5f8456f02..979c214cd 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -2209,8 +2209,8 @@ krb5_get_wrapped_length (krb5_context context, size_t blocksize = et->blocksize; size_t res; - res = et->confoundersize + et->cksumtype->checksumsize + data_len; - res = (res + blocksize - 1) / blocksize * blocksize; + res = (data_len + blocksize - 1) / blocksize * blocksize; + res = res + et->confoundersize + et->cksumtype->checksumsize; return res; }