Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiLib/UefiLibPrint.c
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129295
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiLib/UefiLibPrint.c
r58466 r77662 3 3 Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE 4 4 5 Copyright (c) 2007 - 201 2, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 475 475 ASSERT (UgaDraw!= NULL); 476 476 477 Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); 477 // 478 // Ensure Width * Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) doesn't overflow. 479 // 480 if (Blt->Width > DivU64x32 (MAX_UINTN, Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))) { 481 goto Error; 482 } 483 484 Blt->Image.Bitmap = AllocateZeroPool ((UINT32) Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); 478 485 ASSERT (Blt->Image.Bitmap != NULL); 479 486 … … 755 762 } 756 763 757 BufferToReturn = Allocate ZeroPool(SizeRequired);764 BufferToReturn = AllocatePool(SizeRequired); 758 765 759 766 if (BufferToReturn == NULL) { 760 767 return NULL; 768 } else { 769 BufferToReturn[0] = L'\0'; 761 770 } 762 771 763 772 if (String != NULL) { 764 StrCpy (BufferToReturn, String);773 StrCpyS(BufferToReturn, SizeRequired / sizeof(CHAR16), String); 765 774 } 766 775
Note:
See TracChangeset
for help on using the changeset viewer.