• Paul Eggert's avatar
    Streamline and fix vector-size checks · 7bcea8f8
    Paul Eggert authored
    * 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.
    7bcea8f8
alloc.c 199 KB