From 04bb6788ddc58a354e487ea27e5a4194102fc4b5 Mon Sep 17 00:00:00 2001 From: qianouyang Date: Mon, 1 Feb 2010 09:53:52 +0000 Subject: =?UTF-8?q?MdeModulePkg\Library\DxeNetLib:=20Update=20the=20NetLib?= =?UTF-8?q?StrToIp6andPrefix()=20to=20return=20different=20values=20for=20?= =?UTF-8?q?two=20situations=20-=20=20a.=20=20The=20Input=20string=20doesn?= =?UTF-8?q?=E2=80=99t=20contain=20the=20prefix=20length;=20b.=20The=20pref?= =?UTF-8?q?ix=20length=20contains=20prefix=20length=20and=20the=20prefix?= =?UTF-8?q?=20length=20is=20zero.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9898 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index d89ac64..a5a6762 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -2760,13 +2760,17 @@ NetLibStrToIp6andPrefix ( } // + // If input string doesn't indicate the prefix length, return 0xff. + // + Length = 0xFF; + + // // Convert the string to prefix length // - Length = 0; if (PrefixStr != NULL) { Status = EFI_INVALID_PARAMETER; - + Length = 0; while (*PrefixStr != '\0') { if (NET_IS_DIGIT (*PrefixStr)) { Length = (UINT8) (Length * 10 + (*PrefixStr - '0')); -- cgit v1.1