* alloc.c (gc_sweep): Don't read past end of array.

In theory, the old code could also have corrupted Emacs internals,
though it'd be very unlikely.
This commit is contained in:
Paul Eggert 2011-07-12 18:04:29 -07:00
parent 7152b011c2
commit 47ea7f442f
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
* alloc.c (gc_sweep): Don't read past end of array.
In theory, the old code could also have corrupted Emacs internals,
though it'd be very unlikely.
2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
* character.c (Fcharacterp): Don't advertise optional ignored

View file

@ -5733,7 +5733,7 @@ gc_sweep (void)
int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT;
/* Scan the mark bits an int at a time. */
for (i = 0; i <= ilim; i++)
for (i = 0; i < ilim; i++)
{
if (cblk->gcmarkbits[i] == -1)
{