diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-17 01:56:30 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-17 01:56:30 +0000 |
commit | e45e09c75b11b6c118bf868f5002c00bec8af478 (patch) | |
tree | d2253ae03326e94a024fdd779b5b84916cb71946 | |
parent | 1aa9860e8f27a7cf5c8d36854945d9af328a0239 (diff) | |
download | edk2-e45e09c75b11b6c118bf868f5002c00bec8af478.zip edk2-e45e09c75b11b6c118bf868f5002c00bec8af478.tar.gz edk2-e45e09c75b11b6c118bf868f5002c00bec8af478.tar.bz2 |
Correct the code to use SIZE_OF_EFI_FILE_INFO instead of sizeof (EFI_FILE_INFO) to fix a bug when creating a file/directory with single char as file name in root directory.
Signed-off-by: niruiyu
Reviewed-by: jcarsey
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12727 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c index e697b99..0bd1c65 100644 --- a/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c +++ b/UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.c @@ -1,6 +1,6 @@ /*++
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
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
@@ -1823,7 +1823,7 @@ Returns: //
NewFileInfo = (EFI_FILE_INFO *) Buffer;
- if (NewFileInfo->Size <= sizeof (EFI_FILE_INFO) ||
+ if ((NewFileInfo->Size <= SIZE_OF_EFI_FILE_INFO) ||
(NewFileInfo->Attribute &~(EFI_FILE_VALID_ATTR)) ||
(sizeof (UINTN) == 4 && NewFileInfo->Size > 0xFFFFFFFF)
) {
|