From 039ae54c1a0313e12677752a48779a5113b8e989 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 12 Jan 2011 22:00:40 +0000 Subject: [PATCH] Don't call memset with a zero length git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24594 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/k5sealv3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/krb5/k5sealv3.c b/src/lib/gssapi/krb5/k5sealv3.c index 0e9b35975..1613913a7 100644 --- a/src/lib/gssapi/krb5/k5sealv3.c +++ b/src/lib/gssapi/krb5/k5sealv3.c @@ -159,7 +159,8 @@ gss_krb5int_make_seal_token_v3 (krb5_context context, store_64_be(ctx->seq_send, outbuf+8); memcpy(plain.data, message->value, message->length); - memset(plain.data + message->length, 'x', ec); + if (ec != 0) + memset(plain.data + message->length, 'x', ec); memcpy(plain.data + message->length + ec, outbuf, 16); cipher.ciphertext.data = (char *)outbuf + 16; -- 2.26.2