emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105149: * alloc.c (gc_sweep): Don't


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105149: * alloc.c (gc_sweep): Don't read past end of array.
Date: Tue, 12 Jul 2011 18:04:29 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105149
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2011-07-12 18:04:29 -0700
message:
  * 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.
modified:
  src/ChangeLog
  src/alloc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-07-12 21:17:39 +0000
+++ b/src/ChangeLog     2011-07-13 01:04:29 +0000
@@ -1,3 +1,9 @@
+2011-07-13  Paul Eggert  <address@hidden>
+
+       * 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  <address@hidden>
 
        * character.c (Fcharacterp): Don't advertise optional ignored

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2011-07-10 08:52:10 +0000
+++ b/src/alloc.c       2011-07-13 01:04:29 +0000
@@ -5733,7 +5733,7 @@
        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)
              {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]