From e5bc83f5e7a6c5f48dc10e69fca377d1478fc4dc Mon Sep 17 00:00:00 2001 From: Shenglei Zhang Date: Feb 19 2019 08:15:15 +0000 Subject: MdePkg/BaseLib: Change a variable type in a bitwise operation Change the type of variable Chr from CHAR8 to UINT32 in a bitwise operation, to make the two variables in the operation have the same size. https://bugzilla.tianocore.org/show_bug.cgi?id=1527 Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang Reviewed-by: Liming Gao --- diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index 53ff730..a389115 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -2070,7 +2070,7 @@ Base64Decode ( Chr = DecodingTable[(UINT8) Source[SourceIndex++]]; } while (Chr == BAD_V); Value <<= 6; - Value |= Chr; + Value |= (UINT32)Chr; } //