mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
MdeModulePkg: Update RuntimeDxe Crc32 to check the input parameter
This is the regression issue. After apply CalculateCrc32(), the parameter check is missing. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com>
This commit is contained in:
parent
79da2d2849
commit
3372ab3cf2
@ -42,6 +42,10 @@ RuntimeDriverCalculateCrc32 (
|
||||
OUT UINT32 *CrcOut
|
||||
)
|
||||
{
|
||||
if (Data == NULL || DataSize == 0 || CrcOut == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
*CrcOut = CalculateCrc32 (Data, DataSize);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user