From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web08.6308.1634896062148865352 for ; Fri, 22 Oct 2021 02:47:42 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: linux.intel.com, ip: 134.134.136.126, mailfrom: maciej.rabeda@linux.intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10144"; a="216186757" X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="216186757" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 02:47:34 -0700 X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="463987474" 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 02:47:32 -0700 Subject: Re: [edk2-devel] [PATCH 1/1] NetworkPkg/HttpBootDxe: make file extension check case-insensitive To: devel@edk2.groups.io, gary.lin@hpe.com Cc: Jiaxin Wu , Siyuan Fu References: <20211018072143.14726-1-gary.lin@hpe.com> From: "Maciej Rabeda" Message-ID: <51fa6ff8-3c20-ff3d-c38e-bd42f259a508@linux.intel.com> Date: Fri, 22 Oct 2021 11:47:27 +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: <20211018072143.14726-1-gary.lin@hpe.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: pl 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;