mirror of https://github.com/acidanthera/audk.git
OvmfPkg/VirtioFsDxe: Check GetDriverName arguments
The current implementation does not check if Language or DriverName are NULL. This causes the SCT test suite to crash. Add a check to return EFI_INVALID_PARAMETER if any of these pointers are NULL. Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
This commit is contained in:
parent
b94836b224
commit
3f282f4510
|
@ -218,6 +218,10 @@ VirtioFsGetDriverName (
|
|||
OUT CHAR16 **DriverName
|
||||
)
|
||||
{
|
||||
if ((Language == NULL) || (DriverName == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (AsciiStrCmp (Language, "en") != 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue