]> git.proxmox.com Git - mirror_edk2.git/commit - ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c
ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check
authorhegdenag <nagaraj-p.hegde@hpe.com>
Thu, 12 Jan 2017 03:39:38 +0000 (11:39 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Fri, 13 Jan 2017 01:40:48 +0000 (09:40 +0800)
commit521981ee7608b75b51693ea367c9e1d83687d110
tree3cacb9b737a6b86f2953f77819fcb56b47231725
parente9f0be021b7649c15d823e193110c0088cda9a89
ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check

When we issue 'ifconfig6 -s <interface> auto' system hangs with
an ASSERT in StrLen. in IfConfig6SetInterfaceInfo, for 'auto' case
we added checks to rule out the invalid inputs like 'host', 'gw'
and 'dns'. To parse through this, we do a VarArg = VarArg->Next but
we dont check new VarArg before calling StrCmp. Fix with a check
in this patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c