]> git.proxmox.com Git - mirror_edk2.git/commit - Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c
In this fix, WinNtSimpleFileSystemOpen only trims the leading and trailing blank...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Apr 2008 12:35:56 +0000 (12:35 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Apr 2008 12:35:56 +0000 (12:35 +0000)
commit4d3840844d284538dbc9f9005f63f05ea15fc7d0
treefb132e71b2261c0446c286a2a814775d36d4e2d4
parentf100bb0983793e914a6212c94b669404b1087e07
In this fix, WinNtSimpleFileSystemOpen only trims the leading and trailing blank space in the input FileName. The previous implementation before this fix trims all the trailing dots including the case for ".\..", which should move the directory up one level.

A new function IsFileNameValid is added to check if input FileName is valid. If the FileName meets the following scenirio, it will be considered to be invalid:
1) There is two "\" in the path. For example, ".\SomePath\\".
2) There is a least one "/" in the path. The reason is that UEFI 2.1 specifcation only mention that ".", ".." and "\" is valid path modifiers.
3) There is more than two continous dots in the path name token. For example, ".\SomePath\....\SomeName.txt".

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4973 6f19259b-4bc3-4df7-8a09-765794883524
Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c