From 84cfa109f4db75351b8fa8dbe8b31a5b83cda08c Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Thu, 10 Feb 2000 20:02:36 +0000 Subject: [PATCH] Added +1 to strlens so that null terminator will fit in the buffer ;-P git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12032 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ccapi/stdcc_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/ccache/ccapi/stdcc_util.c b/src/lib/krb5/ccache/ccapi/stdcc_util.c index d6f41b069..eb9ed7dfc 100644 --- a/src/lib/krb5/ccache/ccapi/stdcc_util.c +++ b/src/lib/krb5/ccache/ccapi/stdcc_util.c @@ -218,14 +218,14 @@ void dupK5toCC(krb5_context context, krb5_creds *creds, cred_union **cu) * puts it in appl heap with malloc) */ err = krb5_unparse_name(context, creds->client, &tempname); - c->client = malloc(strlen(tempname)); + c->client = malloc(strlen(tempname+1)); if (c->client != NULL) strcpy(c->client,tempname); free(tempname); tempname = NULL; err = krb5_unparse_name(context, creds->server, &tempname); - c->server = malloc(strlen(tempname)); + c->server = malloc(strlen(tempname+1)); if (c->server != NULL) strcpy(c->server,tempname); free(tempname); -- 2.26.2