audk/ShellPkg/Library/UefiShellDriver1CommandsLib
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
..
Connect.c ShellPkg: Fix conditionally uninitialized variables 2023-04-03 15:29:08 +00:00
DevTree.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Devices.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Dh.c ShellPkg/Library: Fix 32-bit truncation of pointer values 2023-03-13 22:11:55 +00:00
Disconnect.c ShellPkgDisconnect: zero-initialize handles 2023-06-02 08:34:00 +00:00
Drivers.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DrvCfg.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DrvDiag.c ShellPkg: Fix conditionally uninitialized variables 2023-04-03 15:29:08 +00:00
OpenInfo.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Reconnect.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellDriver1CommandsLib.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellDriver1CommandsLib.h ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellDriver1CommandsLib.inf ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellDriver1CommandsLib.uni ShellPkg/Library: Fix 32-bit truncation of pointer values 2023-03-13 22:11:55 +00:00
Unload.c ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00