summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-29 09:23:34 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-29 09:23:34 +0000
commitdbcecd5da2a76f069f769feb8d875149078c0ab1 (patch)
tree049aa649b128848aeef3a89c9fc5602a6efe3a3b /MdeModulePkg/Universal/Network/IScsiDxe
parent4dbb98ab164c70d788b956723199c90018467648 (diff)
downloadedk2-dbcecd5da2a76f069f769feb8d875149078c0ab1.zip
edk2-dbcecd5da2a76f069f769feb8d875149078c0ab1.tar.gz
edk2-dbcecd5da2a76f069f769feb8d875149078c0ab1.tar.bz2
Should pass in bytes of string buffer to UnicodeSPrint() rather than Unicode string length.
Signed-off-by: Tian Feng <feng.tian@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13691 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
index 74ab8b8..702f4f4 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
@@ -1,7 +1,7 @@
/** @file
Helper functions for configuring or getting the parameters relating to iSCSI.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
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
@@ -94,7 +94,7 @@ IScsiParseIsIdFromString (
if (StrLen (IsIdStr) != 6) {
UnicodeSPrint (
PortString,
- (UINTN) ISCSI_NAME_IFR_MAX_SIZE,
+ (UINTN) sizeof (PortString),
L"Error! Input is incorrect, please input 6 hex numbers!\n"
);
@@ -700,7 +700,7 @@ IScsiFormCallback (
ConfigFormEntry = IScsiGetConfigFormEntryByIndex ((UINT32) (QuestionId - KEY_DEVICE_ENTRY_BASE));
ASSERT (ConfigFormEntry != NULL);
- UnicodeSPrint (PortString, (UINTN) 128, L"Port %s", ConfigFormEntry->MacString);
+ UnicodeSPrint (PortString, (UINTN) sizeof (PortString), L"Port %s", ConfigFormEntry->MacString);
DeviceFormTitleToken = (EFI_STRING_ID) STR_ISCSI_DEVICE_FORM_TITLE;
HiiSetString (Private->RegisteredHandle, DeviceFormTitleToken, PortString, NULL);
@@ -1034,13 +1034,13 @@ IScsiConfigUpdateForm (
//
// Compose the Port string and create a new EFI_STRING_ID.
//
- UnicodeSPrint (PortString, 128, L"Port %s", ConfigFormEntry->MacString);
+ UnicodeSPrint (PortString, sizeof (PortString), L"Port %s", ConfigFormEntry->MacString);
ConfigFormEntry->PortTitleToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, PortString, NULL);
//
// Compose the help string of this port and create a new EFI_STRING_ID.
//
- UnicodeSPrint (PortString, 128, L"Set the iSCSI parameters on port %s", ConfigFormEntry->MacString);
+ UnicodeSPrint (PortString, sizeof (PortString), L"Set the iSCSI parameters on port %s", ConfigFormEntry->MacString);
ConfigFormEntry->PortTitleHelpToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, PortString, NULL);
InsertTailList (&mIScsiConfigFormList, &ConfigFormEntry->Link);