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=liming.gao@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 0FFB72194EB78 for ; Fri, 15 Feb 2019 05:51:41 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2019 05:51:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,372,1544515200"; d="scan'208";a="124732954" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 15 Feb 2019 05:51:41 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 15 Feb 2019 05:51:40 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 15 Feb 2019 05:51:40 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.102]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.194]) with mapi id 14.03.0415.000; Fri, 15 Feb 2019 21:51:38 +0800 From: "Gao, Liming" To: "Zhang, Shenglei" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" Thread-Topic: [PATCH] MdePkg/BaseLib: Change a variable type in a bitwise operation Thread-Index: AQHUxA9PKTzrDec8wEKHJ/41hlwKhKXg4voQ Date: Fri, 15 Feb 2019 13:51:37 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3DF6BF@SHSMSX104.ccr.corp.intel.com> References: <20190214024455.7688-1-shenglei.zhang@intel.com> In-Reply-To: <20190214024455.7688-1-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTMwYzUxOWMtOThmNi00NGZmLWFjYjYtNzkyYTIxMGJlYWIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYVFybkpQSXB0eVd3c1NVeEtvMktSQkdZRjJqYlN6VFRiMk5nNmE1MkppNFdWekxydFlYb0hKc1AxTXBlNjNIVCJ9 dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: Fri, 15 Feb 2019 13:51:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zhang, Shenglei > Sent: Thursday, February 14, 2019 10:45 AM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Gao, Liming > Subject: [PATCH] MdePkg/BaseLib: Change a variable type in a bitwise oper= ation >=20 > 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=3D1527 >=20 > 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(-) >=20 > diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/Str= ing.c > index 53ff730e9e..a389115d71 100644 > --- a/MdePkg/Library/BaseLib/String.c > +++ b/MdePkg/Library/BaseLib/String.c > @@ -2070,7 +2070,7 @@ Base64Decode ( > Chr =3D DecodingTable[(UINT8) Source[SourceIndex++]]; > } while (Chr =3D=3D BAD_V); > Value <<=3D 6; > - Value |=3D Chr; > + Value |=3D (UINT32)Chr; > } >=20 > // > -- > 2.18.0.windows.1