diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-09-25 17:03:32 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-09-25 17:04:49 +0200 |
commit | fb5a0497707b2eb1dd58e7d403172e4f3e23d234 (patch) | |
tree | 01ddf86773a874127d745c216a9fd38e2f1bd295 /src/fns.c | |
parent | ad88e3e0b5d625282fb73f3378407ac87dad21f0 (diff) | |
download | emacs-fb5a0497707b2eb1dd58e7d403172e4f3e23d234.tar.gz |
Don't crash in copy-alist with non-list argument
* src/fns.c (Fcopy_alist): Check argument type.
* test/src/fns-tests.el (fns--copy-alist): New test.
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fns.c b/src/fns.c index d2f1aadb65c..964141f338d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1417,6 +1417,7 @@ Elements of ALIST that are not conses are also shared. */) { if (NILP (alist)) return alist; + CHECK_CONS (alist); alist = Fcopy_sequence (alist); for (Lisp_Object tem = alist; !NILP (tem); tem = XCDR (tem)) { |