diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-11 08:03:27 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-11 08:03:27 +0000 |
commit | 41a907e423eaa4eec32b924c89474e1285abd012 (patch) | |
tree | 5c98fdcbb2adf4f3ef45450afdb77f109992e736 /EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c | |
parent | b12dbde369a174c6e73c7bc1aeb7518aea64c4a7 (diff) | |
download | edk2-platforms-41a907e423eaa4eec32b924c89474e1285abd012.tar.xz |
Add checking for memory allocation in UI modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2219 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c')
-rw-r--r-- | EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c index d84fcf02b1..466039f8dc 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/InputHandler.c @@ -1233,6 +1233,7 @@ GetSelectionInputPopUp ( //
if (StrLen (StringPtr) > (PopUpWidth - 1)) {
TempStringPtr = AllocateZeroPool (sizeof (CHAR16) * (PopUpWidth - 1));
+ ASSERT (TempStringPtr != NULL);
CopyMem (TempStringPtr, StringPtr, (sizeof (CHAR16) * (PopUpWidth - 5)));
gBS->FreePool (StringPtr);
StringPtr = TempStringPtr;
|