audk/ShellPkg
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
..
Application ShellPkg: Fix conditionally uninitialized variables 2023-04-03 15:29:08 +00:00
DynamicCommand ShellPkg/DpDynamicCommand: Add ResetEnd support in DP command 2022-11-29 04:23:39 +00:00
Include ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Library ShellPkgDisconnect: zero-initialize handles 2023-06-02 08:34:00 +00:00
ShellPkg.ci.yaml ShellPkg: Update YAML to ignore specific ECC files/errors 2021-11-30 14:19:07 +00:00
ShellPkg.dec ShellPkg: Export default shell delay as PCD 2023-01-20 16:43:51 +00:00
ShellPkg.dsc ShellPkg: Add LOONGARCH64 architecture for EDK2 CI. 2022-10-14 02:16:33 +00:00