From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=shenglei.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 54A332194EB70 for ; Wed, 13 Feb 2019 18:44:58 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2019 18:44:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,367,1544515200"; d="scan'208";a="320231710" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by fmsmga005.fm.intel.com with ESMTP; 13 Feb 2019 18:44:56 -0800 From: Shenglei Zhang To: edk2-devel@lists.01.org Cc: Michael D Kinney , Liming Gao Date: Thu, 14 Feb 2019 10:44:55 +0800 Message-Id: <20190214024455.7688-1-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [PATCH] MdePkg/BaseLib: Change a variable type in a bitwise operation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 02:44:58 -0000 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 --- MdePkg/Library/BaseLib/String.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index 53ff730e9e..a389115d71 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; } // -- 2.18.0.windows.1