From 2990bea7667181d26f75380c7404eccf28b5c2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 25 Jul 2009 16:46:57 +0000 Subject: [PATCH] * The bitmap size was computed incorrectly, and thus, StopChecking() could access the block bitmap out of bounds (which usually resulted in a crash). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31749 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index c6654d6fbc..454de83dd5 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -1236,7 +1236,7 @@ BlockAllocator::StopChecking(check_control* control) // fix any damages of the bitmap if (control != NULL && control->status == B_ENTRY_NOT_FOUND) { // calculate the number of used blocks in the check bitmap - size_t size = fVolume->BlockSize() * fNumGroups * fBlocksPerGroup; + size_t size = BitmapSize(); off_t usedBlocks = 0LL; // TODO: update the allocation groups used blocks info