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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel