From: Alexandra Ellwood Date: Thu, 10 Feb 2000 20:02:36 +0000 (+0000) Subject: Added +1 to strlens so that null terminator will fit in the buffer ;-P X-Git-Tag: krb5-1.2-beta1~90 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84cfa109f4db75351b8fa8dbe8b31a5b83cda08c;p=krb5.git 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 --- 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);