From: Ken Raeburn Date: Wed, 12 Jan 2011 22:00:40 +0000 (+0000) Subject: Don't call memset with a zero length X-Git-Tag: krb5-1.10-alpha1~620 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=039ae54c1a0313e12677752a48779a5113b8e989;p=krb5.git Don't call memset with a zero length git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24594 dc483132-0cff-0310-8789-dd5450dbe970 --- 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;