mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-22 13:14:26 +02:00
Nt32Pkg/WinNtBusDriverDxe: Fix memory allocation size
A single byte was allocate for a CHAR16 NUL terminator when instead two bytes should have been used. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
e57350403e
commit
d1fbfd7cd3
@ -1,6 +1,7 @@
|
|||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||||
|
(C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -453,7 +454,7 @@ Returns:
|
|||||||
ASSERT (PcdTempStr != NULL);
|
ASSERT (PcdTempStr != NULL);
|
||||||
|
|
||||||
TempStrSize = StrLen (PcdTempStr);
|
TempStrSize = StrLen (PcdTempStr);
|
||||||
TempStr = AllocateMemory ((TempStrSize * sizeof (CHAR16)) + 1);
|
TempStr = AllocateMemory (((TempStrSize + 1) * sizeof (CHAR16)));
|
||||||
StrCpy (TempStr, PcdTempStr);
|
StrCpy (TempStr, PcdTempStr);
|
||||||
|
|
||||||
StartString = TempStr;
|
StartString = TempStr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user