From 6f88a765a8ce512e7abe293fb32cda779f7d4432 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 23 Nov 2017 19:38:46 +0300 Subject: [PATCH] Check comp size after reading compressed data and simplify filters-apply code --- Sources/XZ/XZBlock.swift | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Sources/XZ/XZBlock.swift b/Sources/XZ/XZBlock.swift index b0a3f51b..5854cfed 100644 --- a/Sources/XZ/XZBlock.swift +++ b/Sources/XZ/XZBlock.swift @@ -70,17 +70,14 @@ struct XZBlock { else { throw XZError.wrongInfoCRC } pointerData.index += 4 - var intResult = pointerData + var out = pointerData let compressedDataStart = pointerData.index - for filterIndex in 0..