diff --git a/FatPkg/EnhancedFatDxe/FileName.c b/FatPkg/EnhancedFatDxe/FileName.c index 4f73e9ef90..09690fb076 100644 --- a/FatPkg/EnhancedFatDxe/FileName.c +++ b/FatPkg/EnhancedFatDxe/FileName.c @@ -299,7 +299,7 @@ Returns: --*/ { - CHAR16 Buffer[FAT_MAIN_NAME_LEN + 1]; + CHAR16 Buffer[FAT_MAIN_NAME_LEN + 1 + FAT_EXTEND_NAME_LEN + 1]; UINT8 OutCaseFlag; ASSERT (StrSize (Str) <= sizeof (Buffer));