Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20868/ntfsprogs
Modified Files:
ntfsresize.c
Log Message:
ntfsresize: fix segfault during fsck if $Bitmap was larger than expected
Index: ntfsresize.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsresize.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- ntfsresize.c 10 May 2005 17:00:03 -0000 1.61
+++ ntfsresize.c 24 May 2005 21:13:51 -0000 1.62
@@ -873,6 +873,11 @@ static void compare_bitmaps(ntfs_volume
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 */
|