From dc438115063378d64441939d12c8f37cea0089ec Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 11 May 2009 22:46:56 +0000 Subject: [PATCH] In recvauth_common, convert a use of strcpy to strdup ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22343 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/recvauth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/krb/recvauth.c b/src/lib/krb5/krb/recvauth.c index 2f56e567d..611546aa5 100644 --- a/src/lib/krb5/krb/recvauth.c +++ b/src/lib/krb5/krb/recvauth.c @@ -173,11 +173,11 @@ recvauth_common(krb5_context context, error.error = KRB_ERR_GENERIC; message = error_message(problem); error.text.length = strlen(message) + 1; - if (!(error.text.data = malloc(error.text.length))) { + error.text.data = strdup(message); + if (!error.text.data) { retval = ENOMEM; goto cleanup; } - strcpy(error.text.data, message); if ((retval = krb5_mk_error(context, &error, &outbuf))) { free(error.text.data); goto cleanup; -- 2.26.2