summaryrefslogtreecommitdiff
path: root/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c')
-rw-r--r--UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c
index 9d9325c..d01fd4e 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);
@@ -1262,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;
}