public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>, Siyuan Fu <siyuan.fu@intel.com>
Subject: [PATCH 1/5] NetworkPkg/HttpBootDxe: fix typo in DHCPv4 packet parsing
Date: Thu, 22 Mar 2018 17:39:29 +0100	[thread overview]
Message-ID: <20180322163933.29122-2-lersek@redhat.com> (raw)
In-Reply-To: <20180322163933.29122-1-lersek@redhat.com>

The string "HTTPClient" has 10 non-NUL characters; the value 9 is a
copy-paste leftover from "PXEClient". Check for all 10 characters in the
vendor-class-identifier option when determining whether the DHCP offer is
an HTTP offer.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 NetworkPkg/HttpBootDxe/HttpBootDhcp4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
index 421ce6eda40e..229e6cb0ec6a 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
@@ -332,8 +332,8 @@ HttpBootParseDhcp4Packet (
   // The offer with "HTTPClient" is a Http offer.
   //
   Option = Options[HTTP_BOOT_DHCP4_TAG_INDEX_CLASS_ID];
-  if ((Option != NULL) && (Option->Length >= 9) &&
-      (CompareMem (Option->Data, DEFAULT_CLASS_ID_DATA, 9) == 0)) {
+  if ((Option != NULL) && (Option->Length >= 10) &&
+      (CompareMem (Option->Data, DEFAULT_CLASS_ID_DATA, 10) == 0)) {
     IsHttpOffer = TRUE;
   }
 
-- 
2.14.1.3.gb7cf6e02401b




  reply	other threads:[~2018-03-22 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 16:39 [PATCH 0/5] NetworkPkg: HTTP and TLS updates Laszlo Ersek
2018-03-22 16:39 ` Laszlo Ersek [this message]
2018-03-22 16:39 ` [PATCH 2/5] NetworkPkg/HttpDxe: use error handler epilogue in TlsConfigCertificate() Laszlo Ersek
2018-03-22 16:39 ` [PATCH 3/5] NetworkPkg/HttpDxe: drop misleading comment / status code in cert config Laszlo Ersek
2018-03-22 16:39 ` [PATCH 4/5] NetworkPkg/HttpDxe: sanity-check the TlsCaCertificate variable before use Laszlo Ersek
2018-03-22 16:39 ` [PATCH 5/5] NetworkPkg/TlsAuthConfigDxe: preserve TlsCaCertificate variable attributes Laszlo Ersek
2018-03-27  9:32 ` [PATCH 0/5] NetworkPkg: HTTP and TLS updates Laszlo Ersek
2018-03-28  4:32 ` Fu, Siyuan
2018-03-28  5:35 ` Wu, Jiaxin
2018-03-28 11:18   ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180322163933.29122-2-lersek@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox