summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorLin, Gary (HPS OE-Linux) <gary.lin@hpe.com>2021-10-18 15:21:43 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-10-22 10:04:10 +0000
commitbd5ec03d87cacc5be2de4284b092aafd4ac4eb31 (patch)
tree0ba37f1fa7570ce1c156237ac9b3d33f1ea7d583 /NetworkPkg
parent2f286930a8280f4d817460020110009938f695b6 (diff)
downloadedk2-bd5ec03d87cacc5be2de4284b092aafd4ac4eb31.tar.gz
edk2-bd5ec03d87cacc5be2de4284b092aafd4ac4eb31.tar.bz2
edk2-bd5ec03d87cacc5be2de4284b092aafd4ac4eb31.zip
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
index 37a95e031e..a91411db7d 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;