Re: [edk2] [PATCH v3 5/5] MdeModulePkg/AtaAtapiPassThru: Fix possible out of range left shift

2017-09-27 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Wu, Hao A Sent: Thursday, September 28, 2017 12:32 PM To: edk2-devel@lists.01.org Cc: Wu, Hao A ; Shi, Steven ; Zeng, Star ; Dong, Eric Subject: [PATCH v3 5/5] MdeModulePkg/AtaAtapiPassThru: Fix possible out of range left shift REF: htt

[edk2] [PATCH v3 5/5] MdeModulePkg/AtaAtapiPassThru: Fix possible out of range left shift

2017-09-27 Thread Hao Wu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=699 Within function AhciModeInitialization(), left shift operations of 'BIT0' in the following statements: "if ((PortImplementBitMap & (BIT0 << Port)) != 0) {" will incur possible out of range left shift when Port is 31, since "1 << 31" is possi