diff options
author | Lin, Gary (HPS OE-Linux) <gary.lin@hpe.com> | 2021-10-18 15:21:43 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-10-22 10:04:10 +0000 |
commit | bd5ec03d87cacc5be2de4284b092aafd4ac4eb31 (patch) | |
tree | 0ba37f1fa7570ce1c156237ac9b3d33f1ea7d583 /NetworkPkg | |
parent | 2f286930a8280f4d817460020110009938f695b6 (diff) | |
download | edk2-bd5ec03d87cacc5be2de4284b092aafd4ac4eb31.zip edk2-bd5ec03d87cacc5be2de4284b092aafd4ac4eb31.tar.gz edk2-bd5ec03d87cacc5be2de4284b092aafd4ac4eb31.tar.bz2 |
NetworkPkg/HttpBootDxe: make file extension check case-insensitive
https://bugzilla.tianocore.org/show_bug.cgi?id=3694
HttpBootCheckImageType() was using the case-sensitive AsciiStrCmp() to
check the file extensions and this could reject the images with
upper-case file names. Using the case-insensitive AsciiStriCmp() to
avoid the issue.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Gary Lin <gary.lin@hpe.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootSupport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c index 37a95e0..a91411d 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c @@ -681,11 +681,11 @@ HttpBootCheckImageType ( }
FilePost = FilePath + AsciiStrLen (FilePath) - 4;
- if (AsciiStrCmp (FilePost, ".efi") == 0) {
+ if (AsciiStriCmp (FilePost, ".efi") == 0) {
*ImageType = ImageTypeEfi;
- } else if (AsciiStrCmp (FilePost, ".iso") == 0) {
+ } else if (AsciiStriCmp (FilePost, ".iso") == 0) {
*ImageType = ImageTypeVirtualCd;
- } else if (AsciiStrCmp (FilePost, ".img") == 0) {
+ } else if (AsciiStriCmp (FilePost, ".img") == 0) {
*ImageType = ImageTypeVirtualDisk;
} else {
*ImageType = ImageTypeMax;
|