<div>Line number 1348 does contain a typecast with UINT32, but it is after</div>
<div>all the operations (16-bit left shift followed by OR'ing) are over.</div>
<div>To avoid any SIGN_EXTENSION, typecast the intermediate result after</div>
<div>16-bit left shift operation immediately with UINT32.</div>
<div> </div>
<div>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4204</div>
<div>Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com></div>
<div>---</div>
<div> MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 2 +-</div>
<div> 1 file changed, 1 insertion(+), 1 deletion(-)</div>
<div> </div>
<div>diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c</div>
<div>index 1070516b35..cbe6bee2ab 100644</div>
<div>--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c</div>
<div>+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c</div>
<div>@@ -1345,7 +1345,7 @@ AtaPassThruPassThru (</div>
<div> // Check logical block size</div>
<div> //</div>
<div> if ((IdentifyData->AtaData.phy_logic_sector_support & BIT12) != 0) {</div>
<div>- BlockSize = (UINT32)(((IdentifyData->AtaData.logic_sector_size_hi << 16) | IdentifyData->AtaData.logic_sector_size_lo) * sizeof (UINT16));</div>
<div>+ BlockSize = (((UINT32)(IdentifyData->AtaData.logic_sector_size_hi << 16) | IdentifyData->AtaData.logic_sector_size_lo) * sizeof (UINT16));</div>
<div> }</div>
<div> }</div>
<div> </div>
<div>--</div>
<div>2.36.1.windows.1</div>
<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>
You receive all messages sent to this group.
<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/97912">View/Reply Online (#97912)</a> |
|
<a target="_blank" href="https://groups.io/mt/96045596/1813853">Mute This Topic</a>
| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>
<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |
<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>
[edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>