From a8e511c212af9fff1f8d5b4d2520aeaf4ecb6e4c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 27 May 2017 20:07:06 +0200 Subject: Fix wrong FAT32 jump opcode in its header --- src/Common/Fat.c | 2 +- src/Core/FatFormatter.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Common/Fat.c b/src/Common/Fat.c index 7625e869..9cf477c2 100644 --- a/src/Common/Fat.c +++ b/src/Common/Fat.c @@ -139,7 +139,7 @@ PutBoot (fatparams * ft, unsigned char *boot) int cnt = 0; boot[cnt++] = 0xeb; /* boot jump */ - boot[cnt++] = 0x3c; + boot[cnt++] = (ft->size_fat == 32)? 0x58: 0x3c; boot[cnt++] = 0x90; memcpy (boot + cnt, "MSDOS5.0", 8); /* system id */ cnt += 8; diff --git a/src/Core/FatFormatter.cpp b/src/Core/FatFormatter.cpp index 9fb54ff7..a882e7ab 100644 --- a/src/Core/FatFormatter.cpp +++ b/src/Core/FatFormatter.cpp @@ -153,8 +153,8 @@ namespace VeraCrypt { int cnt = 0; - boot[cnt++] = 0xeb; /* boot jump */ - boot[cnt++] = 0x3c; + boot[cnt++] = 0xeb; /* boot jump */ + boot[cnt++] = (ft->size_fat == 32)? 0x58: 0x3c; boot[cnt++] = 0x90; memcpy (boot + cnt, "MSDOS5.0", 8); /* system id */ cnt += 8; -- cgit v1.2.3