From 7d6cdbc8dd3efda6ccdbc919a51b5c0adff4beaa Mon Sep 17 00:00:00 2001 From: tye1 Date: Mon, 1 Feb 2010 05:01:07 +0000 Subject: [PATCH] =?utf8?q?1.=20Update=20the=20maximum=20length=20to=20224?= =?utf8?q?=20in=20ISCSI=5FCONFIG=5FIFR=5FNVDATA()=20to=20store=20223=20byt?= =?utf8?q?e=20name=20plus=20one=20NULL-terminator.=202.=20Update=20the=20m?= =?utf8?q?inimum=20length=20to=204=20in=20VFR=20file=20for=20target/initia?= =?utf8?q?tor=20name=20for=20requiring=20prefix=20=E2=80=9Ciqn.=E2=80=9D?= =?utf8?q?=203.=20Fix=20the=2064bit=20unalignment=20exception=20at=20IPF?= =?utf8?q?=20due=20to=20Rsdt=20is=2032=20bit=20alignment=20but=20OemTableI?= =?utf8?q?d=20field=20of=20Rsdt=20is=20UINT64=20type.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9896 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr | 6 +++--- .../Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h | 7 ++++--- MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr index 666fa04170..e4a27d757e 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr @@ -1,7 +1,7 @@ /** @file Vfr file for iSCSI config. -Copyright (c) 2004 - 2008, Intel Corporation.
+Copyright (c) 2004 - 2010, Intel Corporation.
All rights reserved. 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 @@ -34,7 +34,7 @@ formset help = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP), flags = INTERACTIVE, key = KEY_INITIATOR_NAME, - minsize = 8, + minsize = ISCSI_NAME_IFR_MIN_SIZE, maxsize = ISCSI_NAME_IFR_MAX_SIZE, endstring; @@ -105,7 +105,7 @@ formset help = STRING_TOKEN(STR_ISCSI_TARGET_NAME), flags = INTERACTIVE, key = KEY_TARGET_NAME, - minsize = 8, + minsize = ISCSI_NAME_IFR_MIN_SIZE, maxsize = ISCSI_NAME_IFR_MAX_SIZE, endstring; diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h index 2e9736ec32..24942f57ba 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h @@ -1,7 +1,7 @@ /** @file Define NVData structures used by the iSCSI configuration component -Copyright (c) 2004 - 2007, Intel Corporation.
+Copyright (c) 2004 - 2010, Intel Corporation.
All rights reserved. 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 @@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // Vfr has a limit on the size, it's 255 bytes. // +#define ISCSI_NAME_IFR_MIN_SIZE 4 #define ISCSI_NAME_IFR_MAX_SIZE 223 #define IP_MIN_SIZE 7 @@ -77,7 +78,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #pragma pack(1) typedef struct { - CHAR16 InitiatorName[ISCSI_NAME_IFR_MAX_SIZE]; + CHAR16 InitiatorName[ISCSI_NAME_MAX_SIZE]; UINT8 Enabled; @@ -86,7 +87,7 @@ typedef struct { CHAR16 SubnetMask[IP4_STR_MAX_SIZE]; CHAR16 Gateway[IP4_STR_MAX_SIZE]; - CHAR16 TargetName[ISCSI_NAME_IFR_MAX_SIZE]; + CHAR16 TargetName[ISCSI_NAME_MAX_SIZE]; CHAR16 TargetIp[IP4_STR_MAX_SIZE]; UINT16 TargetPort; CHAR16 BootLun[ISCSI_LUN_STR_MAX_LEN]; diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index 6ca8a217f5..cbf699f0d2 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -1,7 +1,7 @@ /** @file Implementation for iSCSI Boot Firmware Table publication. -Copyright (c) 2004 - 2009, Intel Corporation.
+Copyright (c) 2004 - 2010, Intel Corporation.
All rights reserved. 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 @@ -45,7 +45,7 @@ IScsiInitIbfTableHeader ( Header->OemId[4] = 'L'; CopyMem (Header->OemId, OemId, sizeof (Header->OemId)); - Header->OemTableId = *OemTableId; + CopyMem (&Header->OemTableId, OemTableId, sizeof (UINT64)); } /** -- 2.39.2