MdeModulePkg/FvSimpleFileSystem:Fix a potential NULL dereference issue.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16562 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Feng Tian 2014-12-30 08:18:57 +00:00 committed by erictian
parent 871f673315
commit 5a2dcd134a
1 changed files with 3 additions and 0 deletions

View File

@ -499,6 +499,9 @@ FvSimpleFileSystemOpen (
Instance = File->Instance;
FileName = TrimFilePathToAbsolutePath (FileName);
if (FileName == NULL) {
return EFI_INVALID_PARAMETER;
}
if (FileName[0] == L'\\') {
FileName++;