diff options
author | Laszlo Ersek <lersek@redhat.com> | 2018-03-22 14:22:40 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2018-03-28 13:07:07 +0200 |
commit | 1ba4a4df3972cec30b2aa44ff9ff53e5f5eeddc1 (patch) | |
tree | bd76abbea38726d56129a13ffc860ed7c372505a | |
parent | 699a2c30cb6e74a55f0c3f67c376460f99c201ed (diff) | |
download | edk2-1ba4a4df3972cec30b2aa44ff9ff53e5f5eeddc1.tar.gz edk2-1ba4a4df3972cec30b2aa44ff9ff53e5f5eeddc1.tar.bz2 edk2-1ba4a4df3972cec30b2aa44ff9ff53e5f5eeddc1.zip |
NetworkPkg/HttpBootDxe: fix typo in DHCPv4 packet parsing
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>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootDhcp4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c index 421ce6eda4..229e6cb0ec 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;
}
|