Added +1 to strlens so that null terminator will fit in the buffer ;-P
authorAlexandra Ellwood <lxs@mit.edu>
Thu, 10 Feb 2000 20:02:36 +0000 (20:02 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Thu, 10 Feb 2000 20:02:36 +0000 (20:02 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12032 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/ccapi/stdcc_util.c

index d6f41b069236dae8f318e6fc6e6f6c4e1c4d782f..eb9ed7dfc6e2be0b9530d6de30c7ee5054466e21 100644 (file)
@@ -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);