Raymond Toy pushed to branch issue-437-find-self at cmucl / cmucl Commits: bfc65529 by Raymond Toy at 2025-10-27T08:39:00-07:00 Check results from malloc and exit if malloc fails - - - - - 1 changed file: - src/lisp/lisp.c Changes: ===================================== src/lisp/lisp.c ===================================== @@ -143,6 +143,11 @@ default_cmucllib(const char *argv0arg) char *cwd; char *newpath = malloc(PATH_MAX); + if (!newpath) { + perror("Failed to malloc space for newpath"); + exit(1); + } + cwd = realpath(argv0arg, newpath); if (debug_lisp_search) { @@ -195,6 +200,11 @@ default_cmucllib(const char *argv0arg) /* Create the colon separated list of directories */ defpath = malloc(total_len + 1); + if (!defpath) { + perror("Failed to malloc space for cmucllib"); + exit(1); + } + *defpath = '\0'; ptr = cmucllib_search_list; View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/bfc655297cd0fe2cc57ba365... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/bfc655297cd0fe2cc57ba365... You're receiving this email because of your account on gitlab.common-lisp.net.