diff options
author | Christophe Grenier <[email protected]> | 2015-04-11 13:55:39 +0200 |
---|---|---|
committer | Christophe Grenier <[email protected]> | 2015-04-11 13:55:39 +0200 |
commit | 6e482795afc203fe53e57739b3b8411352652b60 (patch) | |
tree | 3d72102f7c6d3984ecf0f3d8e09fc8fa399b074e /src | |
parent | b83edfd7b5378aa225b6fdc4575fbc6409d34439 (diff) |
Fix buffer overflow in check_HPFS()
Diffstat (limited to 'src')
-rw-r--r-- | src/hpfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); |