Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reinforce pathnames defence.

  • Loading branch information...
commit 3d62408c641da33342ade625da6056fefcf454bd 1 parent 45b0681
@stassats authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 inotify.lisp
View
10 inotify.lisp
@@ -105,9 +105,17 @@
cookie
name)
+(defun parse-event-name (event)
+ (let* ((name (event-name event))
+ (dot (position #\. name :from-end t)))
+ (if dot
+ (make-pathname :name (subseq name 0 dot)
+ :type (subseq name (1+ dot)))
+ (make-pathname :name name))))
+
(defun event-full-name (event)
(if (event-name event)
- (merge-pathnames (event-name event)
+ (merge-pathnames (parse-event-name event)
(watch-pathname (event-watch event)))
(watch-pathname (event-watch event))))
Please sign in to comment.
Something went wrong with that request. Please try again.