ntfsresize: fix segfault during fsck if $Bitmap was larger than expected

edge.strict_endians
szaka 2005-05-24 21:13:51 +00:00
parent 0c72b6f242
commit 6aa5cc17fe
2 changed files with 7 additions and 0 deletions

View File

@ -141,6 +141,8 @@ xx/xx/2005 - 2.0.0-WIP
the volume is tried to be opened read-write. (Szaka)
- Move back from BitKeeper to CVS on SF.net and fix executable
permissions that got lost during the move. (Anton)
- ntfsresize: fix segfault during filesystem check if NTFS $Bitmap file
size was larger than it should have been. (Szaka)
04/09/2004 - 1.9.4 - Urgent bug fixes.

View File

@ -873,6 +873,11 @@ static void compare_bitmaps(ntfs_volume *vol, struct bitmap *a)
break;
}
if (a->size < pos + count)
err_exit("$Bitmap file size is larger than "
"expected (%lld+ versus %lld)\n",
pos + count, a->size);
for (i = 0; i < count; i++, pos++) {
s64 cl; /* current cluster */