]> git.eshelyaron.com Git - emacs.git/commit
Streamline and fix vector-size checks
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Dec 2018 00:56:32 +0000 (16:56 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Dec 2018 00:58:40 +0000 (16:58 -0800)
commit7bcea8f8c11d10fd189c4250042dfe68e2df8c3a
tree3676ecf2fccc0b7c4dede99487274931c1214784
parenta9732737f2b48a78de72d67f6ed950495788ed1d
Streamline and fix vector-size checks

* src/alloc.c (VECTOR_ELTS_MAX): New constant.
(allocate_vectorlike): LEN now must be positive.  Assume LEN
is in range.  All callers changed.
(allocate_vector): Arg is now ptrdiff_t, not EMACS_INT.
All callers changed.  Return zero vector here, not in
allocate_vectorlike.
* src/lisp.h (make_uninit_vector): Simplify.
* src/xwidget.c (webkit_js_to_lisp):
Check for overflow in ptrdiff_t calculations.
src/alloc.c
src/lisp.h
src/xwidget.c