Skip to content

Commit c7dd0b9

Browse files
committed
fix TOCTTOU in generated init file
Ref: https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use
1 parent 10b61e5 commit c7dd0b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quicklisp/impl-util.lisp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
(format stream "~v@T(let ((quicklisp-init ~S))~%"
114114
indentation
115115
(quicklisp-init-file-form)))
116-
(format stream "~v@T (when (probe-file quicklisp-init)~%" indentation)
117-
(format stream "~v@T (load quicklisp-init)))~%~%" indentation))
116+
(format stream "~v@T (load quicklisp-init :if-does-not-exist nil))~%"
117+
indentation))
118118

119119
(defun suitable-lisp-init-file (implementation)
120120
"Return the name of IMPLEMENTATION's init file. If IMPLEMENTAION is

0 commit comments

Comments
 (0)