+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
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]);