summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang, Lubo <lubo.zhang@intel.com>2016-07-08 15:50:46 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2016-07-11 10:46:49 +0800
commitb522ca0cf5ab1f272fcfb7f20b487d47bbf480c4 (patch)
tree1c559d0083fc3555c9f2c0f8d0a85ea8673a90d0
parentc9a07555728814bb7d9d8fdf61cdb334b6b5a33d (diff)
downloadedk2-b522ca0cf5ab1f272fcfb7f20b487d47bbf480c4.tar.gz
edk2-b522ca0cf5ab1f272fcfb7f20b487d47bbf480c4.tar.bz2
edk2-b522ca0cf5ab1f272fcfb7f20b487d47bbf480c4.zip
NetworkPkg: Fix Assert issue in iSCSI driver.
The bug existed in replacing AsciiStrToUnicodeStr with AsciiStrToUnicodeStrS, since MacString now is a pointer, the value sizeof(MacString)/sizeof (MacString[0]) is not correct here as the third parameter. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
-rw-r--r--NetworkPkg/IScsiDxe/IScsiConfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c
index 8015e3de53..3631e72e34 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.c
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
@@ -687,7 +687,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
return EFI_OUT_OF_RESOURCES;
}
- AsciiStrToUnicodeStrS (Attempt->MacString, MacString, sizeof (MacString) / sizeof (MacString[0]));
+ AsciiStrToUnicodeStrS (Attempt->MacString, MacString, ISCSI_MAX_MAC_STRING_LEN);
UnicodeSPrint (
mPrivate->PortString,