]> xenbits.xensource.com Git - ovmf.git/commitdiff
RedfishPkg: Correct variable type to prevent memory corruption
authorVu Nguyen <vunguyen@os.amperecomputing.com>
Thu, 13 Apr 2023 09:24:49 +0000 (16:24 +0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 May 2023 13:12:01 +0000 (13:12 +0000)
Id will be casted by CoreOpenProtocol, declare this variable with a
wrong type might result in the corruption of other local variables.

Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h

index 4a9e9f7b81a4359b10ad16769dcb35cd9b02f6b1..6b94e5814c4368db00f73c2ce089403a2796a1de 100644 (file)
@@ -3,6 +3,7 @@
 \r
   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -84,7 +85,7 @@ struct _RESTEX_SERVICE {
   //\r
   EFI_HANDLE                      HttpChildHandle;\r
 \r
-  UINT32                          Id;\r
+  UINT32                          *Id;\r
 \r
   EFI_REST_EX_SERVICE_INFO        RestExServiceInfo;\r
 };\r