Commit e20bb249 authored by Paul Eggert's avatar Paul Eggert
Browse files

* fns.c (sxhash_bool_vector): Fix buffer read overrun.

parent 9f6a18d2
2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
* fns.c (sxhash_bool_vector): Fix buffer read overrun.
2013-10-09 Eli Zaretskii <eliz@gnu.org>
* term.c (tty_menu_activate): Flush the output stream after
......
......@@ -4191,7 +4191,9 @@ sxhash_bool_vector (Lisp_Object vec)
EMACS_UINT hash = XBOOL_VECTOR (vec)->size;
int i, n;
n = min (SXHASH_MAX_LEN, XBOOL_VECTOR (vec)->header.size);
n = min (SXHASH_MAX_LEN,
((XBOOL_VECTOR (vec)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
/ BOOL_VECTOR_BITS_PER_CHAR));
for (i = 0; i < n; ++i)
hash = sxhash_combine (hash, XBOOL_VECTOR (vec)->data[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment