]> git.eshelyaron.com Git - emacs.git/commitdiff
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)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Feb 2025 10:41:56 +0000 (11:41 +0100)
(cherry picked from commit 411db5543274275896ff4bf93096e9fd5574d06e)

lisp/help.el

index e8481f49a6bfcd8ffaa7e204ab909f780b7c9274..60fa4063fc388424310202923f074b7e2f6e8c9e 100644 (file)
@@ -2458,7 +2458,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)))