[if gte mso 9]>

Re: [edk2] MdeModulePkg: Fix parameter verification for SetAttribute

Subject: Re: [edk2] MdeModulePkg: Fix parameter verification for SetAttribute

From: "Carsey, Jaben" <jaben.carsey@intel.com>

To: "Li, Elvin" <elvin.li@intel.com>, "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2014-07-31 22:07:43

Good catch!

 

Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

 

From: Li, Elvin
Sent: Thursday, July 31, 2014 12:43 AM
To: edk2-devel@lists.sourceforge.net; Carsey, Jaben
Cc: Bjorge, Erik C; Kinney, Michael D
Subject: RE: MdeModulePkg: Fix parameter verification for SetAttribute
Importance: High

 

Jaben,

                I catch another same issue of SetAttribute in Consplitter. Consplitter made a wrong check for Attribute. Now I fixed it as well.

 

 

MdeModulePkg: Fix wrong check for SetAttribute in Consplitter

 

Original code check if Attribute > 0x7FFFFFFF, this is wrong and fail to check valid case per UEFI spec.

 

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Elvin Li <elvin.li@intel.com>

 

 

Thanks

Elvin

From: Carsey, Jaben [mailto:jaben.carsey@intel.com]
Sent: Friday, July 25, 2014 6:59 AM
To: Bjorge, Erik C; Kinney, Michael D
Cc: edk2-devel@lists.sourceforge.net
Subject: [edk2] MdeModulePkg: Fix parameter verification for SetAttribute

 

Erik & Mike,

 

Can you please check this?  I found this during debug and I realize that this is not verifying the correct number of bits.  I need to get an error when the 8th bit being set.

 

Reference from UEFI 2.4B SetAttribute() API:

Attribute                                               The attribute to set.  Bits 0..3 are the foreground color, and bits 4..6 are the background color.  All other bits are reserved.  See “Related Definitions” below. 

 

MdeModulePkg: Fix parameter verification for SetAttribute

 

Check for 8th bit being reserved as per UEFI spec.

 

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>