diff options
| author | Greg Hudson <ghudson@mit.edu> | 2009-05-11 22:46:56 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2009-05-11 22:46:56 +0000 |
| commit | dc438115063378d64441939d12c8f37cea0089ec (patch) | |
| tree | f80a575971c60efbc91aa3c7f354b8c2949dca6b /src | |
| parent | 292415b758d58df15aff93c644a45e070afcc2fc (diff) | |
| download | krb5-dc438115063378d64441939d12c8f37cea0089ec.tar.gz krb5-dc438115063378d64441939d12c8f37cea0089ec.tar.xz krb5-dc438115063378d64441939d12c8f37cea0089ec.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/krb5/krb/recvauth.c | 4 |
1 files 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; |
