aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPip Cet2025-01-26 14:34:45 +0000
committerPip Cet2025-01-26 17:02:42 +0000
commitb07c12ce59c96db753a1f8f3a829f9ab5514e35f (patch)
tree894646c25ca57a57863b18d9b7fa8ea0f6f0d416 /src
parent8cfb4e35da4b7ffa84c521e28fd592c40209d04e (diff)
downloademacs-b07c12ce59c96db753a1f8f3a829f9ab5514e35f.tar.gz
emacs-b07c12ce59c96db753a1f8f3a829f9ab5514e35f.zip
Avoid crashes in Fdocumentation caused by incorrect data types
Note that this can only change things when function-documentation is defined or overloaded incorrectly. * src/doc.c (Fdocumentation): Check that the cdr of a docstring cons is a fixnum.
Diffstat (limited to 'src')
-rw-r--r--src/doc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c
index 6f4ce79f1f1..09e099efcdb 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -362,7 +362,7 @@ string is passed through `substitute-command-keys'. */)
362 from the DOC file (bug in src/Makefile.in). */ 362 from the DOC file (bug in src/Makefile.in). */
363 if (BASE_EQ (doc, make_fixnum (0))) 363 if (BASE_EQ (doc, make_fixnum (0)))
364 doc = Qnil; 364 doc = Qnil;
365 if (FIXNUMP (doc) || CONSP (doc)) 365 if (FIXNUMP (doc) || (CONSP (doc) && FIXNUMP (XCDR (doc))))
366 { 366 {
367 Lisp_Object tem = get_doc_string (doc, 0); 367 Lisp_Object tem = get_doc_string (doc, 0);
368 if (NILP (tem) && try_reload) 368 if (NILP (tem) && try_reload)