<div>Line number 365 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=4209</div>
<div>Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com></div>
<div>---</div>
<div> MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 2 +-</div>
<div> 1 file changed, 1 insertion(+), 1 deletion(-)</div>
<div> </div>
<div>diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c</div>
<div>index 4334169d25..081cd5595a 100644</div>
<div>--- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c</div>
<div>+++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c</div>
<div>@@ -362,7 +362,7 @@ IdentifyAtaDevice (</div>
<div> // Check logical block size</div>
<div> //</div>
<div> if ((PhyLogicSectorSupport & BIT12) != 0) {</div>
<div>- BlockMedia->BlockSize = (UINT32)(((IdentifyData->logic_sector_size_hi << 16) | IdentifyData->logic_sector_size_lo) * sizeof (UINT16));</div>
<div>+ BlockMedia->BlockSize = (((UINT32)(IdentifyData->logic_sector_size_hi << 16) | IdentifyData->logic_sector_size_lo) * sizeof (UINT16));</div>
<div> }</div>
<div> </div>
<div> AtaDevice->BlockIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION2;</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/97913">View/Reply Online (#97913)</a> |
|
<a target="_blank" href="https://groups.io/mt/96045622/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>