VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Boot
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-12 22:16:14 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-12 23:15:13 (GMT)
commit7e73208e62b441f836f27433a4e297a0e07233b8 (patch)
treea7b059661a63639731654bad2ff2829da0f3cdba /src/Boot
parent22152878f883cb7d1e9ac56a5f59329afd26302b (diff)
downloadVeraCrypt-7e73208e62b441f836f27433a4e297a0e07233b8.zip
VeraCrypt-7e73208e62b441f836f27433a4e297a0e07233b8.tar.gz
Windows Bootloader: Fix Rescue Disk issue when Cascades and SHA256 used. It was caused by the bootloader becoming too big in this case with PIM implementation (larger than the limit of 31232 bytes). We also increase memory requirement for this case
Diffstat (limited to 'src/Boot')
-rw-r--r--src/Boot/Windows/BootCommon.h2
-rw-r--r--src/Boot/Windows/BootDefs.h6
-rw-r--r--src/Boot/Windows/Makefile4
3 files changed, 10 insertions, 2 deletions
diff --git a/src/Boot/Windows/BootCommon.h b/src/Boot/Windows/BootCommon.h
index e8aa821..48682fd 100644
--- a/src/Boot/Windows/BootCommon.h
+++ b/src/Boot/Windows/BootCommon.h
@@ -17,7 +17,7 @@
#include "BootDefs.h"
// The user will be advised to upgrade the rescue disk if upgrading from the following or any previous version
-#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0111
+#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0113
#define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS)
diff --git a/src/Boot/Windows/BootDefs.h b/src/Boot/Windows/BootDefs.h
index eb8629d..5aef658 100644
--- a/src/Boot/Windows/BootDefs.h
+++ b/src/Boot/Windows/BootDefs.h
@@ -14,7 +14,11 @@
#define TC_HEADER_Boot_BootDefs
// Total memory required (CODE + DATA + BSS + STACK + 0x100) in KBytes - determined from linker map.
-#define TC__BOOT_MEMORY_REQUIRED 42
+#ifdef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
+ #define TC__BOOT_MEMORY_REQUIRED 44
+#else
+ #define TC__BOOT_MEMORY_REQUIRED 42
+#endif
#ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE
# undef TC__BOOT_MEMORY_REQUIRED
diff --git a/src/Boot/Windows/Makefile b/src/Boot/Windows/Makefile
index e25965d..3ce069c 100644
--- a/src/Boot/Windows/Makefile
+++ b/src/Boot/Windows/Makefile
@@ -193,6 +193,10 @@ $(LIBS)
$(LD) $(LFLAGS) @$(PROJ).crf
del $(PROJ).crf $(PROJ).crf2
+# Compress the Rescue Disk botloader for Cascades and SHA2 since it is too big (size > 31232 bytes)
+!if DEFINED(RESCUE_DISK) && !DEFINED (SINGLE_CIPHER) && "$(SINGLE_PRF)" == "SHA2"
+ upx $(PROJ).$(TARGETEXT)
+!endif
gzip.exe -c -n --best $(PROJ).$(TARGETEXT) >$(PROJ).$(TARGETEXT).gz
-dd.exe conv=notrunc,sync bs=512 seek=5 if=$(PROJ).$(TARGETEXT).gz of=$(PROJ).flp 2>NUL:
cd ..