From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.6554.1634899293953103092 for ; Fri, 22 Oct 2021 03:41:34 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: linux.intel.com, ip: 192.55.52.136, mailfrom: maciej.rabeda@linux.intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10144"; a="209381619" X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="209381619" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 03:40:32 -0700 X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="464001131" Received: from mrabeda-mobl.ger.corp.intel.com (HELO [10.249.150.253]) ([10.249.150.253]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 03:40:31 -0700 Subject: Re: [edk2-devel] [PATCH 1/1] NetworkPkg/HttpBootDxe: make file extension check case-insensitive From: "Maciej Rabeda" To: devel@edk2.groups.io, gary.lin@hpe.com Cc: Jiaxin Wu , Siyuan Fu Reply-To: devel@edk2.groups.io, maciej.rabeda@linux.intel.com References: <20211018072143.14726-1-gary.lin@hpe.com> <16B0514E989550C5.22910@groups.io> Message-ID: Date: Fri, 22 Oct 2021 12:40:29 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <16B0514E989550C5.22910@groups.io> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: pl Patch merged. PR: https://github.com/tianocore/edk2/pull/2107 On 22-Oct-21 11:47, Maciej Rabeda wrote: > Thanks for the patch. > > Reviewed-by: Maciej Rabeda > > On 18-Oct-21 09:21, Lin, Gary (HPS OE-Linux) wrote: >> 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 >> Cc: Jiaxin Wu >> Cc: Siyuan Fu >> Signed-off-by: Gary Lin >> --- >>   NetworkPkg/HttpBootDxe/HttpBootSupport.c | 6 +++--- >>   1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c >> b/NetworkPkg/HttpBootDxe/HttpBootSupport.c >> index 37a95e031e9c..a91411db7d1b 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; > > > > > >