* [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 [Patch V2 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior Yonghong Zhu
@ 2017-08-03 8:59 ` Yonghong Zhu
2017-08-10 9:48 ` Gao, Liming
2017-08-03 8:59 ` [Patch V2 2/4] DuetPkg: " Yonghong Zhu
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Yonghong Zhu @ 2017-08-03 8:59 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Michael D Kinney, Andrew Fish
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
---
BaseTools/Source/C/Common/Decompress.c | 4 ++--
BaseTools/Source/C/TianoCompress/TianoCompress.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/C/Common/Decompress.c b/BaseTools/Source/C/Common/Decompress.c
index 4b83e88..b2049bd 100644
--- a/BaseTools/Source/C/Common/Decompress.c
+++ b/BaseTools/Source/C/Common/Decompress.c
@@ -87,15 +87,15 @@ Arguments:
Returns: (VOID)
--*/
{
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits);
while (NumOfBits > Sd->mBitCount) {
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ Sd->mBitBuf |= (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
diff --git a/BaseTools/Source/C/TianoCompress/TianoCompress.c b/BaseTools/Source/C/TianoCompress/TianoCompress.c
index f810511..046fb36 100644
--- a/BaseTools/Source/C/TianoCompress/TianoCompress.c
+++ b/BaseTools/Source/C/TianoCompress/TianoCompress.c
@@ -2064,15 +2064,15 @@ Arguments:
Returns: (VOID)
--*/
{
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits);
while (NumOfBits > Sd->mBitCount) {
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ Sd->mBitBuf |= (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
--
2.6.1.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 ` [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined Yonghong Zhu
@ 2017-08-10 9:48 ` Gao, Liming
0 siblings, 0 replies; 9+ messages in thread
From: Gao, Liming @ 2017-08-10 9:48 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Andrew Fish
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yonghong Zhu
> Sent: Thursday, August 3, 2017 5:00 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Andrew Fish <afish@apple.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined
>
> Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Andrew Fish <afish@apple.com>
> ---
> BaseTools/Source/C/Common/Decompress.c | 4 ++--
> BaseTools/Source/C/TianoCompress/TianoCompress.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/BaseTools/Source/C/Common/Decompress.c b/BaseTools/Source/C/Common/Decompress.c
> index 4b83e88..b2049bd 100644
> --- a/BaseTools/Source/C/Common/Decompress.c
> +++ b/BaseTools/Source/C/Common/Decompress.c
> @@ -87,15 +87,15 @@ Arguments:
>
> Returns: (VOID)
>
> --*/
> {
> - Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
> + Sd->mBitBuf = (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits);
>
> while (NumOfBits > Sd->mBitCount) {
>
> - Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
> + Sd->mBitBuf |= (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
>
> if (Sd->mCompSize > 0) {
> //
> // Get 1 byte into SubBitBuf
> //
> diff --git a/BaseTools/Source/C/TianoCompress/TianoCompress.c b/BaseTools/Source/C/TianoCompress/TianoCompress.c
> index f810511..046fb36 100644
> --- a/BaseTools/Source/C/TianoCompress/TianoCompress.c
> +++ b/BaseTools/Source/C/TianoCompress/TianoCompress.c
> @@ -2064,15 +2064,15 @@ Arguments:
>
> Returns: (VOID)
>
> --*/
> {
> - Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
> + Sd->mBitBuf = (UINT32) (((UINT64)Sd->mBitBuf) << NumOfBits);
>
> while (NumOfBits > Sd->mBitCount) {
>
> - Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
> + Sd->mBitBuf |= (UINT32) (((UINT64)Sd->mSubBitBuf) << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
>
> if (Sd->mCompSize > 0) {
> //
> // Get 1 byte into SubBitBuf
> //
> --
> 2.6.1.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Patch V2 2/4] DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 [Patch V2 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior Yonghong Zhu
2017-08-03 8:59 ` [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined Yonghong Zhu
@ 2017-08-03 8:59 ` Yonghong Zhu
2017-08-04 1:26 ` Wu, Hao A
2017-08-03 8:59 ` [Patch V2 3/4] IntelFrameworkModulePkg: " Yonghong Zhu
2017-08-03 8:59 ` [Patch V2 4/4] MdePkg: " Yonghong Zhu
3 siblings, 1 reply; 9+ messages in thread
From: Yonghong Zhu @ 2017-08-03 8:59 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni, Hao Wu, Andrew Fish
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
---
DuetPkg/EfiLdr/TianoDecompress.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/DuetPkg/EfiLdr/TianoDecompress.c b/DuetPkg/EfiLdr/TianoDecompress.c
index b504e8e..695f516 100644
--- a/DuetPkg/EfiLdr/TianoDecompress.c
+++ b/DuetPkg/EfiLdr/TianoDecompress.c
@@ -91,15 +91,15 @@ Arguments:
Returns: (VOID)
--*/
{
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits);
while (NumOfBits > Sd->mBitCount) {
-
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount);
+ Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits);
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
--
2.6.1.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Patch V2 2/4] DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 ` [Patch V2 2/4] DuetPkg: " Yonghong Zhu
@ 2017-08-04 1:26 ` Wu, Hao A
0 siblings, 0 replies; 9+ messages in thread
From: Wu, Hao A @ 2017-08-04 1:26 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu, Andrew Fish
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Thursday, August 03, 2017 5:00 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu; Wu, Hao A; Andrew Fish
> Subject: [Patch V2 2/4] DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as
> undefined
>
> Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Andrew Fish <afish@apple.com>
> ---
> DuetPkg/EfiLdr/TianoDecompress.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/DuetPkg/EfiLdr/TianoDecompress.c
> b/DuetPkg/EfiLdr/TianoDecompress.c
> index b504e8e..695f516 100644
> --- a/DuetPkg/EfiLdr/TianoDecompress.c
> +++ b/DuetPkg/EfiLdr/TianoDecompress.c
> @@ -91,15 +91,15 @@ Arguments:
>
> Returns: (VOID)
>
> --*/
> {
> - Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
> + Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits);
>
> while (NumOfBits > Sd->mBitCount) {
> -
> - Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16)
> (NumOfBits - Sd->mBitCount)));
> + NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount);
> + Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits);
>
> if (Sd->mCompSize > 0) {
> //
> // Get 1 byte into SubBitBuf
> //
> --
> 2.6.1.windows.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Patch V2 3/4] IntelFrameworkModulePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 [Patch V2 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior Yonghong Zhu
2017-08-03 8:59 ` [Patch V2 1/4] BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefined Yonghong Zhu
2017-08-03 8:59 ` [Patch V2 2/4] DuetPkg: " Yonghong Zhu
@ 2017-08-03 8:59 ` Yonghong Zhu
2017-08-10 9:48 ` Gao, Liming
2017-08-03 8:59 ` [Patch V2 4/4] MdePkg: " Yonghong Zhu
3 siblings, 1 reply; 9+ messages in thread
From: Yonghong Zhu @ 2017-08-03 8:59 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Michael D Kinney, Jeff Fan, Andrew Fish
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
---
.../BaseUefiTianoCustomDecompressLib.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
index e0ba053..5d64f02 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
@@ -28,18 +28,18 @@ FillBuf (
)
{
//
// Left shift NumOfBits of bits in advance
//
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits);
//
// Copy data needed in bytes into mSbuBitBuf
//
while (NumOfBits > Sd->mBitCount) {
-
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount);
+ Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits);
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
--
2.6.1.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Patch V2 3/4] IntelFrameworkModulePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 ` [Patch V2 3/4] IntelFrameworkModulePkg: " Yonghong Zhu
@ 2017-08-10 9:48 ` Gao, Liming
0 siblings, 0 replies; 9+ messages in thread
From: Gao, Liming @ 2017-08-10 9:48 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org
Cc: Kinney, Michael D, Fan, Jeff, Andrew Fish
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Thursday, August 3, 2017 5:00 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Andrew
> Fish <afish@apple.com>
> Subject: [Patch V2 3/4] IntelFrameworkModulePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
>
> Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Jeff Fan <jeff.fan@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Andrew Fish <afish@apple.com>
> ---
> .../BaseUefiTianoCustomDecompressLib.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
> b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
> index e0ba053..5d64f02 100644
> --- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
> +++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
> @@ -28,18 +28,18 @@ FillBuf (
> )
> {
> //
> // Left shift NumOfBits of bits in advance
> //
> - Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
> + Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits);
>
> //
> // Copy data needed in bytes into mSbuBitBuf
> //
> while (NumOfBits > Sd->mBitCount) {
> -
> - Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
> + NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount);
> + Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits);
>
> if (Sd->mCompSize > 0) {
> //
> // Get 1 byte into SubBitBuf
> //
> --
> 2.6.1.windows.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Patch V2 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 [Patch V2 0/4] Fix Xcode 9 Beta treating 32-bit left shift as undefined behavior Yonghong Zhu
` (2 preceding siblings ...)
2017-08-03 8:59 ` [Patch V2 3/4] IntelFrameworkModulePkg: " Yonghong Zhu
@ 2017-08-03 8:59 ` Yonghong Zhu
2017-08-10 9:48 ` Gao, Liming
3 siblings, 1 reply; 9+ messages in thread
From: Yonghong Zhu @ 2017-08-03 8:59 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Michael D Kinney, Andrew Fish
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
---
MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
index e3b2846..e818543 100644
--- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
+++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
@@ -38,18 +38,18 @@ FillBuf (
)
{
//
// Left shift NumOfBits of bits in advance
//
- Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
+ Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits);
//
// Copy data needed in bytes into mSbuBitBuf
//
while (NumOfBits > Sd->mBitCount) {
-
- Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
+ NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount);
+ Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits);
if (Sd->mCompSize > 0) {
//
// Get 1 byte into SubBitBuf
//
--
2.6.1.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Patch V2 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
2017-08-03 8:59 ` [Patch V2 4/4] MdePkg: " Yonghong Zhu
@ 2017-08-10 9:48 ` Gao, Liming
0 siblings, 0 replies; 9+ messages in thread
From: Gao, Liming @ 2017-08-10 9:48 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Andrew Fish
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Thursday, August 3, 2017 5:00 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Andrew Fish <afish@apple.com>
> Subject: [Patch V2 4/4] MdePkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined
>
> Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Andrew Fish <afish@apple.com>
> ---
> MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
> b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
> index e3b2846..e818543 100644
> --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
> +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
> @@ -38,18 +38,18 @@ FillBuf (
> )
> {
> //
> // Left shift NumOfBits of bits in advance
> //
> - Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
> + Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits);
>
> //
> // Copy data needed in bytes into mSbuBitBuf
> //
> while (NumOfBits > Sd->mBitCount) {
> -
> - Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
> + NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount);
> + Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits);
>
> if (Sd->mCompSize > 0) {
> //
> // Get 1 byte into SubBitBuf
> //
> --
> 2.6.1.windows.1
^ permalink raw reply [flat|nested] 9+ messages in thread