1 Index: acpica-unix2-20181003/source/compiler/aslanalyze.c
2 ===================================================================
3 --- acpica-unix2-20181003.orig/source/compiler/aslanalyze.c
4 +++ acpica-unix2-20181003/source/compiler/aslanalyze.c
5 @@ -355,11 +355,16 @@ AnCheckMethodReturnValue (
7 if (ThisNodeBtype != 0)
9 - sprintf (AslGbl_MsgBuffer,
13 + cnt = asprintf (&strp,
14 "Method returns [%s], %s operator requires [%s]",
15 AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
17 - AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
18 + AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, strp);
24 Index: acpica-unix2-20181003/source/compiler/aslpredef.c
25 ===================================================================
26 --- acpica-unix2-20181003.orig/source/compiler/aslpredef.c
27 +++ acpica-unix2-20181003/source/compiler/aslpredef.c
28 @@ -159,14 +159,19 @@ ApCheckForPredefinedMethod (
29 if (MethodInfo->NumReturnNoValue &&
30 ThisName->Info.ExpectedBtypes)
35 AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer,
36 ThisName->Info.ExpectedBtypes);
38 - sprintf (AslGbl_MsgBuffer, "%s required for %4.4s",
39 - AslGbl_StringBuffer, ThisName->Info.Name);
40 + cnt = asprintf (&strp, "%s required for %4.4s",
41 + AslGbl_StringBuffer, ThisName->Info.Name);
43 AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op,
51 @@ -698,18 +703,26 @@ TypeErrorExit:
53 AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer, ExpectedBtypes);
55 - if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
57 - sprintf (AslGbl_MsgBuffer, "%4.4s: found %s, %s required",
58 - PredefinedName, TypeName, AslGbl_StringBuffer);
62 - sprintf (AslGbl_MsgBuffer, "%4.4s: found %s at index %u, %s required",
63 - PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
67 + if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
69 + cnt = asprintf (&strp, "%4.4s: found %s, %s required",
70 + PredefinedName, TypeName, AslGbl_StringBuffer);
74 + cnt = asprintf (&strp, "%4.4s: found %s at index %u, %s required",
75 + PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
78 + AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, strp);
83 - AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, AslGbl_MsgBuffer);
87 Index: acpica-unix2-20181003/source/compiler/aslwalks.c
88 ===================================================================
89 --- acpica-unix2-20181003.orig/source/compiler/aslwalks.c
90 +++ acpica-unix2-20181003/source/compiler/aslwalks.c
91 @@ -507,15 +507,19 @@ AnOperandTypecheckWalkEnd (
92 else if (!CommonBtypes)
94 /* No match -- this is a type mismatch error */
98 AnFormatBtype (AslGbl_StringBuffer, ThisNodeBtype);
99 AnFormatBtype (AslGbl_StringBuffer2, RequiredBtypes);
101 - sprintf (AslGbl_MsgBuffer, "[%s] found, %s operator requires [%s]",
102 + cnt = asprintf (&strp, "[%s] found, %s operator requires [%s]",
103 AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
105 AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE,
106 - ArgOp, AslGbl_MsgBuffer);