From: Andrew Innes Date: Tue, 2 Jan 2001 22:38:06 +0000 (+0000) Subject: (convert-standard-filename): Do length check on name X-Git-Tag: emacs-pretest-21.0.95~165 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82d5a7b2a6195b137e5960ea2a65dccf5d8afa84;p=emacs.git (convert-standard-filename): Do length check on name before aref. --- 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)