diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch
index 565ba11..175dfa7 100644
--- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch
+++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch
@@ -27,25 +27,20 @@ Reviewed-by: Bob Feng <bob.c.feng@intel.com>
  BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
-index 4e9b499f8d..4b9f5fa692 100644
 --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
 +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
-@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
- 
-   nowPos64 = p->nowPos64;
-   RangeEnc_Init(&p->rc);
--  p->rc.outStream = &outStream.vt;
- 
-   if (desiredPackSize == 0)
-     return SZ_ERROR_OUTPUT_EOF;
- 
-+  p->rc.outStream = &outStream.vt;
-   res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
-+  p->rc.outStream = NULL;
- 
-   *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
-   *destLen -= outStream.rem;
--- 
-2.36.1
-
+@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHan
+ 
+   nowPos64 = p->nowPos64;
+   RangeEnc_Init(&p->rc);
+-  p->rc.outStream = &outStream.vt;
+ 
+   if (desiredPackSize == 0)
+     return SZ_ERROR_OUTPUT_EOF;
+ 
++  p->rc.outStream = &outStream.vt;
+   res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
++  p->rc.outStream = NULL;
+ 
+   *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
+   *destLen -= outStream.rem;
diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch
index f2142de..ebdc78b 100644
--- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch
+++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch
@@ -21,22 +21,22 @@ Reviewed-by: Bob Feng <bob.c.feng@intel.com>
 --- a/BaseTools/Source/C/GenFfs/GenFfs.c
 +++ b/BaseTools/Source/C/GenFfs/GenFfs.c
 @@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT3
-   PeFileBuffer = (UINT8 *) malloc (PeFileSize);
-   if (PeFileBuffer == NULL) {
-     fclose (InFileHandle);
--    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated  of %s", InFileHandle);
-+    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile);
-     return EFI_OUT_OF_RESOURCES;
-   }
-   fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
+   PeFileBuffer = (UINT8 *) malloc (PeFileSize);
+   if (PeFileBuffer == NULL) {
+     fclose (InFileHandle);
+-    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated  of %s", InFileHandle);
++    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile);
+     return EFI_OUT_OF_RESOURCES;
+   }
+   fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
 --- a/BaseTools/Source/C/GenSec/GenSec.c
 +++ b/BaseTools/Source/C/GenSec/GenSec.c
 @@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT3
-   PeFileBuffer = (UINT8 *) malloc (PeFileSize);
-   if (PeFileBuffer == NULL) {
-     fclose (InFileHandle);
--    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated  of %s", InFileHandle);
-+    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile);
-     return EFI_OUT_OF_RESOURCES;
-   }
-   fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
+   PeFileBuffer = (UINT8 *) malloc (PeFileSize);
+   if (PeFileBuffer == NULL) {
+     fclose (InFileHandle);
+-    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated  of %s", InFileHandle);
++    Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile);
+     return EFI_OUT_OF_RESOURCES;
+   }
+   fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
