X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=UnixPkg%2FUnixSimpleFileSystemDxe%2FUnixSimpleFileSystem.c;h=d01fd4e7510b3d4b7b3384410a75f477211943b3;hb=ccd55824e79865a04b1c872bda4af0f1de1f50be;hp=84ba962739df47a6a7c5369d9250fe6924644f7f;hpb=804405e7d10525e41720216137b2551f62a0663f;p=mirror_edk2.git diff --git a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c index 84ba962739..d01fd4e751 100644 --- a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c +++ b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2007, Intel Corporation +Copyright (c) 2006 - 2009, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -566,6 +566,8 @@ Done: gBS->FreePool (PrivateFile); } + + *Root = NULL; } gBS->RestoreTPL (OldTpl); @@ -1078,7 +1080,6 @@ Returns: return Status; } -STATIC VOID UnixSystemTimeToEfiTime ( EFI_UNIX_THUNK_PROTOCOL *UnixThunk, @@ -1120,7 +1121,6 @@ Returns: } } -STATIC EFI_STATUS UnixSimpleFileSystemFileInfo ( UNIX_EFI_FILE_PRIVATE *PrivateFile, @@ -1264,7 +1264,12 @@ Returns: CHAR8 *FullFileName; EFI_TPL OldTpl; - if (This == NULL || BufferSize == NULL || Buffer == NULL) { + if (This == NULL || BufferSize == NULL) { + return EFI_INVALID_PARAMETER; + } + + if ((*BufferSize != 0) && (Buffer == NULL)) { + // Buffer can be NULL if *BufferSize is zero return EFI_INVALID_PARAMETER; }