lisp/help.el (help-function-arglist): Fix out-of-bounds access (bug#76179)
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 10 Feb 2025 20:35:20 +0000 (15:35 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 10 Feb 2025 20:35:20 +0000 (15:35 -0500)
lisp/help.el

index 5d4c3e615997304677c519d3618aaed2b738fc14..1d87c2209c8cf8c0c7da389afd4626a964d90c49 100644 (file)
@@ -2381,7 +2381,7 @@ the same names as used in the original source code, when possible."
             (dolist (arg arglist)
               (unless (and (symbolp arg)
                            (let ((name (symbol-name arg)))
-                             (if (eq (aref name 0) ?&)
+                             (if (and (> (length name) 0) (eq (aref name 0) ?&))
                                  (memq arg '(&rest &optional))
                                (not (string-search "." name)))))
                 (setq valid nil)))