# HG changeset patch # User Andrew Innes # Date 978475086 0 # Node ID 271ffc04a20dfb37cddf5d8a71dd5bcc24c8476b # Parent 2fa4bcb413d936b89f2abceea54b46d111ca27da (convert-standard-filename): Do length check on name before aref. diff -r 2fa4bcb413d9 -r 271ffc04a20d lisp/w32-fns.el --- a/lisp/w32-fns.el Tue Jan 02 20:34:49 2001 +0000 +++ b/lisp/w32-fns.el Tue Jan 02 22:38:06 2001 +0000 @@ -257,7 +257,8 @@ (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)