From c45c0d3c66bb5281dfd775d5b4323e846722c432 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 31 Dec 2014 12:21:32 +0000 Subject: [PATCH] krb5: Actually 0 padding When we decide we need to zero the padding iovec, do so with 0, not with the length that we've determined. This had no effect because we zero the padding properly later, but it should be fixed, so that things still work when the later memset() goes away. --- lib/krb5/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index 135b94127..cab04f778 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -1545,7 +1545,7 @@ iov_pad_validate(const struct _krb5_encryption_type *et, return KRB5_BAD_MSIZE; piv->data.length = pad_sz; if (pad_sz) - memset(piv->data.data, pad_sz, pad_sz); + memset(piv->data.data, 0, pad_sz); else piv = NULL; }