summaryrefslogtreecommitdiffstats
path: root/src/hdaccess.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-04-23 14:48:29 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-04-23 14:48:29 +0200
commit3c0ad725ff4404142c0a6d919978c4b7e1ce8c46 (patch)
tree754f389d037f9e8a1aa0f103307ee8c0013f7011 /src/hdaccess.c
parentf5dc38627c949e2717e4252a370b1fb0743a4a25 (diff)
Reject sector size reported by Windows if bigger than 16MB
Diffstat (limited to 'src/hdaccess.c')
-rw-r--r--src/hdaccess.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hdaccess.c b/src/hdaccess.c
index e752814..4552ed4 100644
--- a/src/hdaccess.c
+++ b/src/hdaccess.c
@@ -550,7 +550,8 @@ static unsigned int disk_get_sector_size(const int hd_h, const char *device, con
{
log_verbose("disk_get_sector_size GetDiskFreeSpaceA %s Ok\n",device);
}
- if(sector_size!=0)
+ /* sector_size <= 16MB*/
+ if(sector_size>0 && sector_size <= (1<<24))
return sector_size;
}
}