commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 01/04: ext2fs: Fix off-by-one


From: Samuel Thibault
Subject: [hurd] 01/04: ext2fs: Fix off-by-one
Date: Wed, 23 Mar 2016 22:48:04 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit c595ceac1ad8c40aec85318e07424e5b6f338dad
Author: Samuel Thibault <address@hidden>
Date:   Fri Mar 18 00:12:23 2016 +0100

    ext2fs: Fix off-by-one
    
    * ext2fs/pager.c (disk_cache_init): Do not add
    disk_cache_info[disk_cache_blocks] to disk_cache_info_free.
---
 ext2fs/pager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index d395472..7d3a8f3 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -914,7 +914,7 @@ disk_cache_init (void)
   /* Initialize disk_cache_info.  Start with the last entry so that
      the first ends up at the front of the free list.  This keeps the
      assertions at the end of this function happy.  */
-  for (int i = disk_cache_blocks; i >= 0; i--)
+  for (int i = disk_cache_blocks - 1; i >= 0; i--)
     {
       disk_cache_info[i].block = DC_NO_BLOCK;
       disk_cache_info[i].flags = 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

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