diff options
author | Hao Wu <hao.a.wu@intel.com> | 2018-10-30 09:06:48 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2018-10-31 08:57:04 +0800 |
commit | 542b03d0a090d10d39da79a881787cbb013f1754 (patch) | |
tree | fde398d8fac15d3d1f5acd5919ef203c377f0b6e /MdeModulePkg/Universal/Disk | |
parent | a0f01e8a22e15000e564f09e82eae13d7127be3c (diff) | |
download | edk2-542b03d0a090d10d39da79a881787cbb013f1754.zip edk2-542b03d0a090d10d39da79a881787cbb013f1754.tar.gz edk2-542b03d0a090d10d39da79a881787cbb013f1754.tar.bz2 |
MdeModulePkg/UdfDxe: Check 'Component Type' within a Path Component
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1279
According to the ECMA-167 standard (3rd Edition - June 1997), Section
14.16.1.1, valid values are 1 to 5. All other values will be treated as a
corrupted volume.
This commit will add such check within function ResolveSymlink().
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'MdeModulePkg/Universal/Disk')
-rw-r--r-- | MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index b9ebddf..fed3da1 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -2257,6 +2257,13 @@ ResolveSymlink ( }
FileName[Index] = L'\0';
break;
+ default:
+ //
+ // According to the ECMA-167 standard (3rd Edition - June 1997), Section
+ // 14.16.1.1, all other values are reserved.
+ //
+ Status = EFI_VOLUME_CORRUPTED;
+ goto Error_Find_File;
}
//
|