From 3907f8a0bab35c90a0d4ee0352a6fdec04b35bd2 Mon Sep 17 00:00:00 2001 From: Abner Chang Date: Wed, 26 Mar 2025 14:20:52 -0500 Subject: [PATCH] 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 --- RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c index 0a308a772b..8ad012323a 100644 --- a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c +++ b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.c @@ -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.
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 );