]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Initialize temp variable in VarCheckPolicyLib
authorBret Barkelew <bret@corthon.com>
Fri, 9 Apr 2021 18:25:11 +0000 (02:25 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 13 Apr 2021 01:24:13 +0000 (01:24 +0000)
commitf8e6bcb6e7c350eb7be887dfdb5aad43cd6373af
tree80a3c368b3884183e41e02f92e7ac4ec3ee4312a
parent4b59b22fed05eea1cb92ad90b86759d4bfbc4870
MdeModulePkg: Initialize temp variable in VarCheckPolicyLib

DumpVariablePolicy() will return EFI_INVALID_PARAMETER if the Buffer
pointer is NULL and the indirect Size is anything but 0. Since this
TempSize was not being initialized it is very likely that this sequence
would not return the total buffer size as expected.

Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3310

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Bret Barkelew <bret.barkelew@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c