|
|
cc9195 |
From 601458a0a87bf4169d1f0c81c0bb454d22abe8f0 Mon Sep 17 00:00:00 2001
|
|
|
cc9195 |
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
|
|
|
cc9195 |
Date: Wed, 9 Jan 2019 17:10:07 +0100
|
|
|
cc9195 |
Subject: [PATCH 3/4] IntelFrameworkModulePkg: Fix UEFI and Tiano Decompression
|
|
|
cc9195 |
logic issue
|
|
|
cc9195 |
MIME-Version: 1.0
|
|
|
cc9195 |
Content-Type: text/plain; charset=UTF-8
|
|
|
cc9195 |
Content-Transfer-Encoding: 8bit
|
|
|
cc9195 |
|
|
|
cc9195 |
Message-id: <20190109161007.3471-4-philmd@redhat.com>
|
|
|
cc9195 |
Patchwork-id: 83926
|
|
|
cc9195 |
O-Subject: [RHEL8 edk2 PATCH 3/3] IntelFrameworkModulePkg: Fix UEFI and Tiano
|
|
|
cc9195 |
Decompression logic issue
|
|
|
cc9195 |
Bugzilla: 1662184
|
|
|
cc9195 |
Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
cc9195 |
Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
|
cc9195 |
|
|
|
cc9195 |
From: Liming Gao <liming.gao@intel.com>
|
|
|
cc9195 |
|
|
|
cc9195 |
https://bugzilla.tianocore.org/show_bug.cgi?id=1317
|
|
|
cc9195 |
|
|
|
cc9195 |
This is a regression issue caused by 684db6da64bc7b5faee4e1174e801c245f563b5c.
|
|
|
cc9195 |
In Decode() function, once mOutBuf is fully filled, Decode() should return.
|
|
|
cc9195 |
Current logic misses the checker of mOutBuf after while() loop.
|
|
|
cc9195 |
|
|
|
cc9195 |
Contributed-under: TianoCore Contribution Agreement 1.1
|
|
|
cc9195 |
Signed-off-by: Liming Gao <liming.gao@intel.com>
|
|
|
cc9195 |
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
|
|
|
cc9195 |
(cherry picked from commit ade71c52a49d659b20c0b433fb11ddb4f4f543c4)
|
|
|
cc9195 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
cc9195 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
cc9195 |
---
|
|
|
cc9195 |
.../BaseUefiTianoCustomDecompressLib.c | 6 ++++++
|
|
|
cc9195 |
1 file changed, 6 insertions(+)
|
|
|
cc9195 |
|
|
|
cc9195 |
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
|
|
|
cc9195 |
index 9b00166..e34bf4b 100644
|
|
|
cc9195 |
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
|
|
|
cc9195 |
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
|
|
|
cc9195 |
@@ -634,6 +634,12 @@ Decode (
|
|
|
cc9195 |
|
|
|
cc9195 |
BytesRemain--;
|
|
|
cc9195 |
}
|
|
|
cc9195 |
+ //
|
|
|
cc9195 |
+ // Once mOutBuf is fully filled, directly return
|
|
|
cc9195 |
+ //
|
|
|
cc9195 |
+ if (Sd->mOutBuf >= Sd->mOrigSize) {
|
|
|
cc9195 |
+ goto Done ;
|
|
|
cc9195 |
+ }
|
|
|
cc9195 |
}
|
|
|
cc9195 |
}
|
|
|
cc9195 |
|
|
|
cc9195 |
--
|
|
|
cc9195 |
1.8.3.1
|
|
|
cc9195 |
|