summaryrefslogtreecommitdiff
path: root/lisp/w32-fns.el
diff options
context:
space:
mode:
authorAndrew Innes <andrewi@gnu.org>2001-01-02 22:38:06 +0000
committerAndrew Innes <andrewi@gnu.org>2001-01-02 22:38:06 +0000
commit82d5a7b2a6195b137e5960ea2a65dccf5d8afa84 (patch)
treeba8dea43d54eef899d481253a81920a0a3c77310 /lisp/w32-fns.el
parent064866e7f5957d0a9c3c09d380fa02949f42fa3f (diff)
downloademacs-82d5a7b2a6195b137e5960ea2a65dccf5d8afa84.tar.gz
(convert-standard-filename): Do length check on name
before aref.
Diffstat (limited to 'lisp/w32-fns.el')
-rw-r--r--lisp/w32-fns.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index ab9c8d82212..8e0e85dc5f1 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -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)