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