diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-05-10 11:24:19 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-09-03 15:09:50 +0800 |
commit | 8b8e91584555b6193f2099a36502763b47501533 (patch) | |
tree | 864b8d57777e8710cd21e2a81c43d3fad31586a1 /BaseTools/Source/Python/sitecustomize.py | |
parent | 17f8c9e97d770c74f84194576bcd97322fbed21e (diff) | |
download | edk2-8b8e91584555b6193f2099a36502763b47501533.tar.gz edk2-8b8e91584555b6193f2099a36502763b47501533.tar.bz2 edk2-8b8e91584555b6193f2099a36502763b47501533.zip |
ShellPkg/CommandLib: avoid NULL derefence and memory leak
Since TianoCore EDK2 commit d65f2cea36d1 ("ShellPkg/CommandLib: Locate
proper UnicodeCollation instance") in edk2 the UEFI Shell crashes if EFI
variable PlatformLang is not defined due to dereferencing gUnicodeCollation
gUnicodeCollation (= NULL) in ShellCommandRegisterCommandName().
Furthermore CommandInit() is leaking PlatformLang if
gUnicodeCollation != NULL.
Close the memory leak and use the first UnicodeCollation instance if
PlatfomLang is not defined.
Fixes: d65f2cea36d1 ("ShellPkg/CommandLib: Locate proper UnicodeCollation
instance")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/sitecustomize.py')
0 files changed, 0 insertions, 0 deletions