Re: [sleuthkit-developers] Istat shows Direct Blocks incorrectly
Brought to you by:
carrier
From: Brian C. <ca...@ce...> - 2007-04-06 12:49:48
|
You are correct. Fixed. thanks, brian On Apr 6, 2007, at 2:31 AM, Makoto Shiotsuki wrote: > When the file system type is Ext, istat falls into eternal loop > and shows Direct Blocks more than existing block numbers. > > example: > > [root@ns sleuthkit-2.08]# bin/istat -f ext /dev/hda1 6033 > inode: 6033 > Allocated > Group: 3 > Generation Id: 702883908 > uid / gid: 0 / 0 > mode: -rw-r----- > size: 6 > num of links: 1 > > Inode Times: > Accessed: Fri Apr 6 14:51:52 2007 > File Modified: Fri Apr 6 14:51:52 2007 > Inode Modified: Fri Apr 6 14:51:52 2007 > > Direct Blocks: > 27354 27355 27356 27357 27358 27359 27360 27361 > 27362 27363 27364 27365 27366 27367 27368 27369 > 27370 27371 27372 27373 27374 27375 27376 27377 > ..... > > This seems to happen because of the wrong comparison of size_t value > in print_addr_act(). (ext2fs.c, line 1798) > > for (i = 0, s = size; s > 0; s -= fs->block_size, i++) { > > Because the type of variable "s" is "size_t", I think this should be > like the following. > > for (i = 0, s = size; s > 0; > s = (s > fs->block_size) ? s - fs->block_size : 0, i++) { > > There is same code in ffs.c so it may have same problem. > > Hope this helps. > > Makoto Shiotsuki > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > sleuthkit-developers mailing list > sle...@li... > https://lists.sourceforge.net/lists/listinfo/sleuthkit-developers |