Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37738984
en ru br
Репозитории ALT
S:3.6.27-alt1
5.1: 3.6.19-alt4
4.1: 3.6.19-alt4
4.0: 3.6.19-alt3
3.0: 3.6.19-alt1
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: reiserfsprogs

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: reiserfsprogs-fsck-mapid.diff
Скачать


From: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH] reiserfsprogs: id_map_init off-by-one
 The following patch fixes a bug where reiserfsck will crash if OIDs up around
 the maximum are in use. The problem is that INDEX_COUNT ends up rounding down
 and the last chunk isn't allocated, causing a segfault.
diff -rup reiserfsprogs-3.6.19/fsck/uobjectid.c reiserfsprogs-3.6.19.devel/fsck/uobjectid.c
--- reiserfsprogs-3.6.19/fsck/uobjectid.c	2004-06-17 15:57:39.000000000 -0400
+++ reiserfsprogs-3.6.19.devel/fsck/uobjectid.c	2006-04-20 15:18:26.000000000 -0400
@@ -15,7 +15,7 @@
 /* 2 bytes for the counter */
 #define BM_SIZE				(ALLOC_SIZE - sizeof(__u16))
 #define BM_INTERVAL			(BM_SIZE * 8)
-#define INDEX_COUNT			(MAX_ID / BM_INTERVAL)
+#define INDEX_COUNT			((MAX_ID / BM_INTERVAL) + 1)
 
 #define id_map_interval(map, id)	(map->index + (id / BM_INTERVAL))
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin