summaryrefslogtreecommitdiffstats
path: root/src/fat.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-04-11 13:51:05 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2015-04-11 13:51:05 +0200
commitb83edfd7b5378aa225b6fdc4575fbc6409d34439 (patch)
treeeb837b6554d73750e5f64ecbc4a396e448c93cfc /src/fat.c
parent847c748f935de93919b37e12d0f27d4c4e69a2c5 (diff)
Fix Testdisk check_OS2MB Stack Buffer overflow found by Denis Andzakovic <denis.andzakovic@security-assessment.com>
Diffstat (limited to 'src/fat.c')
-rw-r--r--src/fat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fat.c b/src/fat.c
index cde16f6..6448076 100644
--- a/src/fat.c
+++ b/src/fat.c
@@ -870,7 +870,7 @@ static int fat32_set_part_name(disk_t *disk_car, partition_t *partition, const s
int check_OS2MB(disk_t *disk, partition_t *partition, const int verbose)
{
- unsigned char buffer[0x200];
+ unsigned char buffer[disk->sector_size];
if((unsigned)disk->pread(disk, &buffer, disk->sector_size, partition->part_offset) != disk->sector_size)
{
screen_buffer_add("check_OS2MB: Read error\n");