9897bb
Index: acpica-unix2-20200925/source/compiler/aslanalyze.c
9897bb
===================================================================
9897bb
--- acpica-unix2-20200925.orig/source/compiler/aslanalyze.c
9897bb
+++ acpica-unix2-20200925/source/compiler/aslanalyze.c
9897bb
@@ -358,11 +358,16 @@ AnCheckMethodReturnValue (
9897bb
          */
9897bb
         if (ThisNodeBtype != 0)
9897bb
         {
9897bb
-            sprintf (AslGbl_MsgBuffer,
9897bb
+	     int cnt;
9897bb
+	     char *strp;
9897bb
+
9897bb
+            cnt = asprintf (&strp,
9897bb
                 "Method returns [%s], %s operator requires [%s]",
9897bb
                 AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
9897bb
 
9897bb
-            AslError (ASL_WARNING, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
9897bb
+            AslError (ASL_WARNING, ASL_MSG_INVALID_TYPE, ArgOp, strp);
9897bb
+	     if (cnt > 0)
9897bb
+	         free(strp);
9897bb
         }
9897bb
     }
9897bb
 
9897bb
Index: acpica-unix2-20200925/source/compiler/aslpredef.c
9897bb
===================================================================
9897bb
--- acpica-unix2-20200925.orig/source/compiler/aslpredef.c
9897bb
+++ acpica-unix2-20200925/source/compiler/aslpredef.c
9897bb
@@ -159,14 +159,19 @@ ApCheckForPredefinedMethod (
9897bb
         if (MethodInfo->NumReturnNoValue &&
9897bb
             ThisName->Info.ExpectedBtypes)
9897bb
         {
9897bb
+	     int cnt;
9897bb
+	     char *strp;
9897bb
+
9897bb
             AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer,
9897bb
                 ThisName->Info.ExpectedBtypes);
9897bb
 
9897bb
-            sprintf (AslGbl_MsgBuffer, "%s required for %4.4s",
9897bb
-                AslGbl_StringBuffer, ThisName->Info.Name);
9897bb
+            cnt = asprintf (&strp, "%s required for %4.4s",
9897bb
+	        AslGbl_StringBuffer, ThisName->Info.Name);
9897bb
 
9897bb
             AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op,
9897bb
-                AslGbl_MsgBuffer);
9897bb
+                strp);
9897bb
+	     if (cnt > 0)
9897bb
+	        free(strp);
9897bb
         }
9897bb
         break;
9897bb
     }
9897bb
@@ -698,18 +703,26 @@ TypeErrorExit:
9897bb
 
9897bb
     AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer, ExpectedBtypes);
9897bb
 
9897bb
-    if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
9897bb
-    {
9897bb
-        sprintf (AslGbl_MsgBuffer, "%4.4s: found %s, %s required",
9897bb
-            PredefinedName, TypeName, AslGbl_StringBuffer);
9897bb
-    }
9897bb
-    else
9897bb
     {
9897bb
-        sprintf (AslGbl_MsgBuffer, "%4.4s: found %s at index %u, %s required",
9897bb
-            PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
9897bb
+	 int cnt;
9897bb
+	 char *strp;
9897bb
+
9897bb
+        if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
9897bb
+        {
9897bb
+            cnt = asprintf (&strp, "%4.4s: found %s, %s required",
9897bb
+                PredefinedName, TypeName, AslGbl_StringBuffer);
9897bb
+        }
9897bb
+        else
9897bb
+        {
9897bb
+            cnt = asprintf (&strp, "%4.4s: found %s at index %u, %s required",
9897bb
+                PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
9897bb
+        }
9897bb
+
9897bb
+	 AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, strp);
9897bb
+	 if (cnt > 0)
9897bb
+	     free(strp);
9897bb
     }
9897bb
 
9897bb
-    AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, AslGbl_MsgBuffer);
9897bb
     return (AE_TYPE);
9897bb
 }
9897bb
 
9897bb
Index: acpica-unix2-20200925/source/compiler/aslwalks.c
9897bb
===================================================================
9897bb
--- acpica-unix2-20200925.orig/source/compiler/aslwalks.c
9897bb
+++ acpica-unix2-20200925/source/compiler/aslwalks.c
9897bb
@@ -515,15 +515,19 @@ AnOperandTypecheckWalkEnd (
9897bb
             else if (!CommonBtypes)
9897bb
             {
9897bb
                 /* No match -- this is a type mismatch error */
9897bb
+		int cnt;
9897bb
+		char *strp;
9897bb
 
9897bb
                 AnFormatBtype (AslGbl_StringBuffer, ThisNodeBtype);
9897bb
                 AnFormatBtype (AslGbl_StringBuffer2, RequiredBtypes);
9897bb
 
9897bb
-                sprintf (AslGbl_MsgBuffer, "[%s] found, %s operator requires [%s]",
9897bb
+                cnt = asprintf (&strp, "[%s] found, %s operator requires [%s]",
9897bb
                     AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
9897bb
 
9897bb
                 AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE,
9897bb
-                    ArgOp, AslGbl_MsgBuffer);
9897bb
+                    ArgOp, strp);
9897bb
+		if (cnt > 0)
9897bb
+		    free(strp);
9897bb
             }
9897bb
 
9897bb
         NextArgument: