[Git][cmucl/cmucl][issue-130-file-author-in-c] Fix typo in allocation for author
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Thu Sep 1 23:31:14 UTC 2022
Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl
Commits:
288e8373 by Raymond Toy at 2022-09-01T16:30:52-07:00
Fix typo in allocation for author
The closing paren is in the wrong place so we didn't allocate enough
memory to hold the author field.
- - - - -
1 changed file:
- src/lisp/os-common.c
Changes:
=====================================
src/lisp/os-common.c
=====================================
@@ -786,7 +786,7 @@ os_file_author(const char *path)
fprintf(stderr, "Allocate %d bytes for author\n",
strlen(result->pw_name + 1));
- author = malloc(strlen(result->pw_name + 1));
+ author = malloc(strlen(result->pw_name) + 1);
if (author) {
fprintf(stderr, "author = %p\n", author);
strcpy(author, result->pw_name);
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/288e837309e3792ba4aaf767eafa82ee29ad07f5
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/288e837309e3792ba4aaf767eafa82ee29ad07f5
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20220901/423a9f03/attachment.html>
More information about the cmucl-cvs
mailing list