summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpDxe/HttpProto.c
diff options
context:
space:
mode:
authorSaloni Kasbekar <saloni.kasbekar@intel.com>2024-07-10 14:44:50 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-11 21:42:32 +0000
commit5c86b0b57c153bde28f925de80cc011dd4ff1f9d (patch)
tree1cf0d54ad4b23ba6a2ab06d1e4ec1d6c4d361016 /NetworkPkg/HttpDxe/HttpProto.c
parent071d2cfab8347e396c8b2709bfb588a18c497bbd (diff)
downloadedk2-5c86b0b57c153bde28f925de80cc011dd4ff1f9d.tar.gz
edk2-5c86b0b57c153bde28f925de80cc011dd4ff1f9d.tar.bz2
edk2-5c86b0b57c153bde28f925de80cc011dd4ff1f9d.zip
NetworkPkg/HttpDxe: Track HttpInstance URL buffer length.
In EfiHttpRequest(), length of target URLs was always compared to fixed-size value, even after allocating a larger URL buffer. Added UrlLen to HTTP_PROTOCOL to store the size and reallocate if the size changes. Signed-off-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpProto.c')
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c
index 9c3b497dce..75eb068010 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -1,7 +1,7 @@
/** @file
Miscellaneous routines for HttpDxe driver.
-Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -738,6 +738,7 @@ HttpInitProtocol (
goto ON_ERROR;
}
+ HttpInstance->UrlLen = HTTP_URL_BUFFER_LEN;
return EFI_SUCCESS;
ON_ERROR:
@@ -847,7 +848,8 @@ HttpCleanProtocol (
if (HttpInstance->Url != NULL) {
FreePool (HttpInstance->Url);
- HttpInstance->Url = NULL;
+ HttpInstance->Url = NULL;
+ HttpInstance->UrlLen = 0;
}
NetMapClean (&HttpInstance->TxTokens);