From: Stefan Monnier Date: Mon, 10 Feb 2025 20:35:20 +0000 (-0500) Subject: lisp/help.el (help-function-arglist): Fix out-of-bounds access (bug#76179) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5536bb9c80e33676b64124323995cc4bce61d2d8;p=emacs.git lisp/help.el (help-function-arglist): Fix out-of-bounds access (bug#76179) (cherry picked from commit 411db5543274275896ff4bf93096e9fd5574d06e) --- diff --git a/lisp/help.el b/lisp/help.el index e8481f49a6b..60fa4063fc3 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -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)))