1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00

(convert-standard-filename): Do length check on name

before aref.
This commit is contained in:
Andrew Innes 2001-01-02 22:38:06 +00:00
parent 064866e7f5
commit 82d5a7b2a6

View File

@ -257,7 +257,8 @@ with a definition that really does change some file names."
(let ((name (copy-sequence filename))
(start 0))
;; leave ':' if part of drive specifier
(if (eq (aref name 1) ?:)
(if (and (> (length name) 1)
(eq (aref name 1) ?:))
(setq start 2))
;; destructively replace invalid filename characters with !
(while (string-match "[?*:<>|\"\000-\037]" name start)