diff options
author | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-27 16:26:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-27 16:26:54 +0000 |
commit | 1bf1b9cc9b55fde85d44a22f829cf09f41a974ab (patch) | |
tree | feb30fce2c8f5cdba62210d726a7f3ad2ab7035b /NetworkPkg/HttpDxe/HttpImpl.c | |
parent | 911a62f1327a7a689e3d061efc4e62508521d48d (diff) | |
parent | b2a431868c4ae0ad99def0a504d2fe097e16cd4f (diff) | |
download | edk2-dependabot/github_actions/github/issue-labeler-3.4.tar.gz |
Merge branch 'master' into dependabot/github_actions/github/issue-labeler-3.4dependabot/github_actions/github/issue-labeler-3.4
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpImpl.c')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpImpl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 6606c29342..9500f565d0 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -1,7 +1,7 @@ /** @file
Implementation of EFI_HTTP_PROTOCOL protocol interfaces.
- Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
@@ -341,14 +341,18 @@ EfiHttpRequest ( //
Url = HttpInstance->Url;
UrlLen = StrLen (Request->Url) + 1;
- if (UrlLen > HTTP_URL_BUFFER_LEN) {
+ if (UrlLen > HttpInstance->UrlLen) {
Url = AllocateZeroPool (UrlLen);
if (Url == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- FreePool (HttpInstance->Url);
- HttpInstance->Url = Url;
+ if (HttpInstance->Url != NULL) {
+ FreePool (HttpInstance->Url);
+ }
+
+ HttpInstance->Url = Url;
+ HttpInstance->UrlLen = UrlLen;
}
UnicodeStrToAsciiStrS (Request->Url, Url, UrlLen);
|