summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:05:05 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:05:05 +0100
commit90ee43b235b88c82839cc3e46fa37a1a2686d1ea (patch)
treed174042fb13b209a3a79d803a0dffc56b90a4737 /src
parent52b444738c8d55f54a937e22aa45fcaa63b51db8 (diff)
Fix bug introduced in commit cf700c77551b30d9c62104adaf47ebbf26774fcc
Diffstat (limited to 'src')
-rw-r--r--src/ext2_sbn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ext2_sbn.c b/src/ext2_sbn.c
index 2876ef4..7c7a178 100644
--- a/src/ext2_sbn.c
+++ b/src/ext2_sbn.c
@@ -64,13 +64,13 @@ static uint64_t next_sb(const uint64_t hd_offset_old)
hd_offset=val* group_size[j] + offset;
}
}
- if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<0 && hd_offset < EXT2_MIN_BLOCK_SIZE<<0)
+ if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<0 && EXT2_MIN_BLOCK_SIZE<<0 < hd_offset)
hd_offset=EXT2_MIN_BLOCK_SIZE<<0;
- else if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<1 && hd_offset < EXT2_MIN_BLOCK_SIZE<<1)
+ else if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<1 && EXT2_MIN_BLOCK_SIZE<<1 < hd_offset)
hd_offset=EXT2_MIN_BLOCK_SIZE<<1;
- else if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<2 && hd_offset < EXT2_MIN_BLOCK_SIZE<<2)
+ else if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<2 && EXT2_MIN_BLOCK_SIZE<<2 < hd_offset)
hd_offset=EXT2_MIN_BLOCK_SIZE<<2;
- else if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<6 && hd_offset < EXT2_MIN_BLOCK_SIZE<<6)
+ else if(hd_offset_old < EXT2_MIN_BLOCK_SIZE<<6 && EXT2_MIN_BLOCK_SIZE<<6 < hd_offset)
hd_offset=EXT2_MIN_BLOCK_SIZE<<6;
return hd_offset;
}