1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

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)

This commit is contained in:
xiaolangde
2020-08-03 21:08:25 +08:00
committed by GitHub
parent 75e11add78
commit 3f25b281e7

View File

@@ -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