diff options
| author | Pip Cet | 2025-01-26 14:34:45 +0000 |
|---|---|---|
| committer | Pip Cet | 2025-01-26 17:02:42 +0000 |
| commit | b07c12ce59c96db753a1f8f3a829f9ab5514e35f (patch) | |
| tree | 894646c25ca57a57863b18d9b7fa8ea0f6f0d416 /src | |
| parent | 8cfb4e35da4b7ffa84c521e28fd592c40209d04e (diff) | |
| download | emacs-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -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) |