summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <[email protected]>2015-04-11 13:55:39 +0200
committerChristophe Grenier <[email protected]>2015-04-11 13:55:39 +0200
commit6e482795afc203fe53e57739b3b8411352652b60 (patch)
tree3d72102f7c6d3984ecf0f3d8e09fc8fa399b074e /src
parentb83edfd7b5378aa225b6fdc4575fbc6409d34439 (diff)
Fix buffer overflow in check_HPFS()
Diffstat (limited to 'src')
-rw-r--r--src/hpfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hpfs.c b/src/hpfs.c
index 3dd629cb..8ce042f2 100644
--- a/src/hpfs.c
+++ b/src/hpfs.c
@@ -80,7 +80,7 @@ int recover_HPFS(disk_t *disk_car,const struct fat_boot_sector*fat_header, parti
int check_HPFS(disk_t *disk_car,partition_t *partition,const int verbose)
{
- unsigned char buffer[512];
+ unsigned char buffer[disk_car->sector_size];
if((unsigned)disk_car->pread(disk_car, &buffer, disk_car->sector_size, partition->part_offset) != disk_car->sector_size)
{
screen_buffer_add("check_HPFS: Read error\n");