summaryrefslogtreecommitdiffstats
path: root/src/exfat_dir.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/exfat_dir.c
parent132fba09962b72a9a86739b968faaa53f140150d (diff)
Fix potential integer overflow
Diffstat (limited to 'src/exfat_dir.c')
-rw-r--r--src/exfat_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/exfat_dir.c b/src/exfat_dir.c
index b57b318..4a3627a 100644
--- a/src/exfat_dir.c
+++ b/src/exfat_dir.c
@@ -239,7 +239,7 @@ static int exfat_dir(disk_t *disk, const partition_t *partition, dir_data_t *dir
nbr_cluster=0;
while(!is_EOC(cluster) && cluster>=2 && nbr_cluster<NBR_CLUSTER_MAX && stop==0)
{
- if(exfat_read_cluster(disk, partition, exfat_header, buffer_dir + (uint64_t) (nbr_cluster<< cluster_shift), cluster) != (1<<cluster_shift))
+ if(exfat_read_cluster(disk, partition, exfat_header, buffer_dir + ((uint64_t) nbr_cluster << cluster_shift), cluster) != (1<<cluster_shift))
{
log_error("exFAT: Can't read directory cluster.\n");
stop=1;