From 5536bb9c80e33676b64124323995cc4bce61d2d8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 10 Feb 2025 15:35:20 -0500 Subject: [PATCH] lisp/help.el (help-function-arglist): Fix out-of-bounds access (bug#76179) (cherry picked from commit 411db5543274275896ff4bf93096e9fd5574d06e) --- lisp/help.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) -- 2.39.5