mirror_edk2/ShellPkg/Library
Gerd Hoffmann a8acc12dfd ShellPkgDisconnect: zero-initialize handles
In case ShellConvertStringToUint64() fails the Handles are left
uninitialized.  That can for example happen for Handle2 and Handle3 in
case only one parameter was specified on the command line. Which can
trigger the ASSERT() in line 185.

Reproducer: boot ovmf to efi shell in qemu, using q35 machine type, then
try disconnect the sata controller in efi shell.

Fix that by explicitly setting them to NULL in that case.  While being
at it also simplify the logic and avoid pointlessly calling
ShellConvertStringToUint64() in case ParamN is NULL.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2023-06-02 08:34:00 +00:00
..
UefiHandleParsingLib ShellPkg/Library: Fix 32-bit truncation of pointer values 2023-03-13 22:11:55 +00:00
UefiShellAcpiViewCommandLib ShellPkg/AcpiView: ERST Parser 2023-02-02 02:49:33 +00:00
UefiShellBcfgCommandLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellCEntryLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellCommandLib ShellPkg: Fix conditionally uninitialized variables 2023-04-03 15:29:08 +00:00
UefiShellDebug1CommandsLib ShellPkg: Add a condition to print accurate type0 Bios Size in smbiosview. 2023-06-02 07:36:02 +00:00
UefiShellDriver1CommandsLib ShellPkgDisconnect: zero-initialize handles 2023-06-02 08:34:00 +00:00
UefiShellInstall1CommandsLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellLevel1CommandsLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellLevel2CommandsLib ShellPkg/Library: Fix 32-bit truncation of pointer values 2023-03-13 22:11:55 +00:00
UefiShellLevel3CommandsLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellNetwork1CommandsLib ShellPkg: Improve "ping" output by adding equals sign after time 2023-03-06 02:41:00 +00:00
UefiShellNetwork2CommandsLib ShellPkg: Improve "ping" output by adding equals sign after time 2023-03-06 02:41:00 +00:00