Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ShellPkg/UefiHandleParsingLib: Fix error allocate pool
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1965 For function InsertNewGuidNameMapping, it rellocate the mGuidList with new size "mGuidListCount+1 * sizeof(GUID_INFO_BLOCK)". That isn't its purpose and would cause a overflow operation in "mGuidList[mGuidListCount - 1].xxx = xxx". Its purpose is to increase 1 block size of mGuidList. Change it to "(mGuidListCount + 1) * sizeof (GUID_INFO_BLOCK)". Adjust the coding style of this function. Cc: Jaben Carsey <[email protected]> Cc: Ray Ni <[email protected]> Cc: Andrew Fish <[email protected]> Reviewed-by: Ray Ni <[email protected]> Signed-off-by: Zhichao Gao <[email protected]>
- Loading branch information