summaryrefslogtreecommitdiffstats
path: root/src/fat_cluster.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-07-26 22:50:16 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-07-26 22:50:16 +0200
commit20942518d5b53680ce461c46a7edb3b2ecbdc38f (patch)
treed78d5160270d1c06c46cb1f7249e7e992f9d0c3d /src/fat_cluster.c
parent132fba09962b72a9a86739b968faaa53f140150d (diff)
Fix potential integer overflow
Diffstat (limited to 'src/fat_cluster.c')
-rw-r--r--src/fat_cluster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fat_cluster.c b/src/fat_cluster.c
index f735f2d..2d9d387 100644
--- a/src/fat_cluster.c
+++ b/src/fat_cluster.c
@@ -60,7 +60,7 @@ int find_sectors_per_cluster(disk_t *disk_car, partition_t *partition, const int
}
#endif
/* 2 fats, maximum cluster size=128 */
- skip_offset=(uint64_t)((partition->part_size-32*disk_car->sector_size)/disk_car->sector_size/128*1.5/disk_car->sector_size*2)*disk_car->sector_size;
+ skip_offset=(uint64_t)((partition->part_size-32*disk_car->sector_size)/disk_car->sector_size/128*3/2/disk_car->sector_size*2)*disk_car->sector_size;
if(verbose>0)
{
log_verbose("find_sectors_per_cluster skip_sectors=%lu (skip_offset=%lu)\n",