diff options
author | robi <robi> | 2011-04-05 18:44:04 +0000 |
---|---|---|
committer | robi <robi> | 2011-04-05 18:44:04 +0000 |
commit | fc9a751d28b4484e6d12c6bae3560030675158dc (patch) | |
tree | cb0aa81a51c197a4cb6500f28b32df305da569f8 /src/inode.c | |
parent | 022612eae379cc1d70b09655096a33d0a5f09617 (diff) |
time protection, prevent damaged inode blocks, need by Expert-Mode
Diffstat (limited to 'src/inode.c')
-rw-r--r-- | src/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/inode.c b/src/inode.c index 283ec42..d5ee24e 100644 --- a/src/inode.c +++ b/src/inode.c @@ -31,7 +31,8 @@ #include "inode.h" #include "ring_buf.h" -extern ext2_filsys current_fs; +extern ext2_filsys current_fs; +extern time_t now_time ; @@ -799,7 +800,8 @@ struct ring_buf* get_j_inode_list(struct ext2_super_block *es, ext2_ino_t inode_ if ( ext2fs_read_inode_full(current_fs, inode_nr, (struct ext2_inode*)inode_buf, pos.size)) goto errout; inode_pointer = (struct ext2_inode*) inode_buf ; - if(((! inode_pointer->i_dtime) && inode_pointer->i_ctime) || (inode_pointer->i_ctime > ctime)){ + if((((! inode_pointer->i_dtime) && inode_pointer->i_ctime) || (inode_pointer->i_ctime > ctime)) && + (inode_pointer->i_ctime < (__u32) now_time)){ item = r_item_add(buf); if ( ! item){ fprintf(stderr,"Error: can not allocate memory for inode\n"); |