Raymond Toy pushed to branch issue-306-lisp.c at cmucl / cmucl
Commits: a21feb6f by Raymond Toy at 2024-07-24T08:49:54-07:00 Use sprintf instead of strcpy/strcat (in default_cmucllib)
- - - - -
1 changed file:
- src/lisp/lisp.c
Changes:
===================================== src/lisp/lisp.c ===================================== @@ -164,9 +164,8 @@ default_cmucllib(const char *argv0arg) if (argv0_dir[0] == '/') { cwd = malloc(strlen(argv0_dir) + 2); check_ptr(cwd, "No space to duplicate argv0"); - - strcpy(cwd, argv0_dir); - strcat(cwd, "/"); + + sprintf(cwd, "%s/", argv0_dir); if (debug_lisp_search) { fprintf(stderr, "absolute path, argv[0] = %s\n", cwd); }
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a21feb6f05bde430f56c880c...