Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/lisp/os-common.c
    ... ... @@ -786,7 +786,7 @@ os_file_author(const char *path)
    786 786
             fprintf(stderr, "Allocate %d bytes for author\n",
    
    787 787
                     strlen(result->pw_name + 1));
    
    788 788
             
    
    789
    -        author = malloc(strlen(result->pw_name + 1));
    
    789
    +        author = malloc(strlen(result->pw_name) + 1);
    
    790 790
             if (author) {
    
    791 791
                 fprintf(stderr, "author = %p\n", author);
    
    792 792
                 strcpy(author, result->pw_name);