mirror of https://github.com/acidanthera/audk.git
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
|
OUT UINT32 *CrcOut
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (Data == NULL || DataSize == 0 || CrcOut == NULL) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
*CrcOut = CalculateCrc32 (Data, DataSize);
|
*CrcOut = CalculateCrc32 (Data, DataSize);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue