File ipxe-zbin-Perform-extra-normalisation-af.patch of Package qemu-linux-user.openSUSE_Leap_42.1_Update

From a1b0710fb742e9f3075a60504ab1ea99580ce19f Mon Sep 17 00:00:00 2001
From: Michael Brown <mcb30@ipxe.org>
Date: Thu, 26 Feb 2015 09:46:59 +0000
Subject: [PATCH 3/3] [zbin] Perform extra normalisation after completing
 decompression
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

LZMA performs an extra normalisation after decompression is complete,
which does not affect the output but may consume an extra byte from
the input (and so may affect which byte is identified as being the
start of the next block).

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
(cherry picked from commit 9cdf68a2190a050a0b60d4ad6f51ec88c1b1b296)
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 src/arch/i386/prefix/unlzma.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/arch/i386/prefix/unlzma.S b/src/arch/i386/prefix/unlzma.S
index f6c7428..b0588fd 100644
--- a/src/arch/i386/prefix/unlzma.S
+++ b/src/arch/i386/prefix/unlzma.S
@@ -885,6 +885,7 @@ decompress:
 1:	/* Decompress until we reach end of buffer */
 	call	lzma_decode
 	jnc	1b
+	call	rc_normalise
 	print_character '\n'
 	/* Undo BCJ filter */
 	pushl	%esi
-- 
1.9.0

openSUSE Build Service is sponsored by