VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Boot/Windows/BootSector.asm
diff options
context:
space:
mode:
authorxiaolangde <xiaolangde@gmail.com>2020-08-03 21:08:25 +0800
committerGitHub <noreply@github.com>2020-08-03 15:08:25 +0200
commit3f25b281e7f00b16c3166faa4ef0258990944f93 (patch)
tree101d9ac36f672acd23d1825f2d6c075cc04e7cef /src/Boot/Windows/BootSector.asm
parent75e11add78f02e7d4007427c14812bb3ee7677c2 (diff)
downloadVeraCrypt-3f25b281e7f00b16c3166faa4ef0258990944f93.tar.gz
VeraCrypt-3f25b281e7f00b16c3166faa4ef0258990944f93.zip
Windows Bootloader: pass correct compressed data size to decompressor. Because the ds segment register is modified when setting up the decompressor segment, loader length should be read from the cs segment. (#666)
Diffstat (limited to 'src/Boot/Windows/BootSector.asm')
-rw-r--r--src/Boot/Windows/BootSector.asm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Boot/Windows/BootSector.asm b/src/Boot/Windows/BootSector.asm
index 351b2c67..0d2bbdca 100644
--- a/src/Boot/Windows/BootSector.asm
+++ b/src/Boot/Windows/BootSector.asm
@@ -139,7 +139,7 @@ checksum_ok:
push dx
; Decompress boot loader
- mov cx, word ptr [start + TC_BOOT_SECTOR_LOADER_LENGTH_OFFSET]
+ mov cx, word ptr cs:[start + TC_BOOT_SECTOR_LOADER_LENGTH_OFFSET]
sub cx, TC_GZIP_HEADER_SIZE
push cx ; Compressed data size
push TC_BOOT_LOADER_COMPRESSED_BUFFER_OFFSET + TC_GZIP_HEADER_SIZE ; Compressed data