From c7dd0b99334a80a4e916a7fb0e4dfaeff0f6a393 Mon Sep 17 00:00:00 2001 From: Guilherme Janczak Date: Sat, 23 Nov 2024 03:15:25 +0000 Subject: [PATCH] fix TOCTTOU in generated init file Ref: https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use --- quicklisp/impl-util.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quicklisp/impl-util.lisp b/quicklisp/impl-util.lisp index efa78c3..f69cb51 100644 --- a/quicklisp/impl-util.lisp +++ b/quicklisp/impl-util.lisp @@ -113,8 +113,8 @@ (format stream "~v@T(let ((quicklisp-init ~S))~%" indentation (quicklisp-init-file-form))) - (format stream "~v@T (when (probe-file quicklisp-init)~%" indentation) - (format stream "~v@T (load quicklisp-init)))~%~%" indentation)) + (format stream "~v@T (load quicklisp-init :if-does-not-exist nil))~%" + indentation)) (defun suitable-lisp-init-file (implementation) "Return the name of IMPLEMENTATION's init file. If IMPLEMENTAION is