> > + > > + if (NeedLoad) { > > + PatchCount++; > > [[Eric]] This logic seems not good. Image one case when PatchCount == 7 and > MaxPatchNumber == 8. In this case, current logic needs to allocate new buffer > for PatchInfoBuffer, but actually PatchInfoBuffer should be enough for this > case. > So I think "PatchCount++;" code should move after " TotalLoadSize += > PatchInfoBuffer[PatchCount - 1].AlignedSize;" and later " PatchCount - 1" > should > be " PatchCount". > > Thanks, > Eric
Agree, how about changing the logic to: if (NeedLoad) { PatchCount++; if (PatchCount > MaxPatchNumber) { ... Best Regards, Hao Wu -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52602): https://edk2.groups.io/g/devel/message/52602 Mute This Topic: https://groups.io/mt/69283205/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-