RedfishPkg/RedfishHttpDxe : Fix the incorrect length of the Basic Auth

Use AsciiStrLen function instead of AsciiStrSize to determine
the length of Basic Auth string.

Signed-off-by: Abner Chang <abner.chang@amd.com>
This commit is contained in:
Abner Chang
2025-03-26 14:20:52 -05:00
parent 9006a9b5e4
commit 3907f8a0ba

View File

@@ -3,6 +3,7 @@
for EDK2 Redfish Feature driver to do HTTP operations.
Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -399,7 +400,7 @@ RedfishCreateRedfishService (
Status = Base64Encode (
(CONST UINT8 *)BasicAuthString,
BasicAuthStrSize,
AsciiStrLen (BasicAuthString),
EncodedAuthString,
&EncodedAuthStrSize
);
@@ -411,7 +412,7 @@ RedfishCreateRedfishService (
Status = Base64Encode (
(CONST UINT8 *)BasicAuthString,
BasicAuthStrSize,
AsciiStrLen (BasicAuthString),
EncodedAuthString,
&EncodedAuthStrSize
);