]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure that we are not aset-ing Lisp records in purespace.
authorVibhav Pant <vibhavp@gmail.com>
Tue, 20 Dec 2022 15:59:54 +0000 (21:29 +0530)
committerVibhav Pant <vibhavp@gmail.com>
Tue, 20 Dec 2022 15:59:54 +0000 (21:29 +0530)
* src/data.c (Faset): Enforce that Lisp records passed to aset are
impure with CHECK_IMPURE.

src/data.c

index c6b85e17bc23e76a0710b59583a455fb91eb9b8b..7ad06a9faa5db7c184de6f42a0fc2e7b5d816c2f 100644 (file)
@@ -2619,6 +2619,7 @@ bool-vector.  IDX starts at 0.  */)
     }
   else if (RECORDP (array))
     {
+      CHECK_IMPURE (array, XVECTOR (array));
       if (idxval < 0 || idxval >= PVSIZE (array))
        args_out_of_range (array, idx);
       ASET (array, idxval, newelt);