[PATCH] fwts_iasl_interface.c: allocate temp buffers required for IASL (LP: #1195209)

Keng-Yü Lin keng-yu.lin at canonical.com
Mon Jul 1 09:04:13 UTC 2013


On Mon, Jul 1, 2013 at 4:05 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Earlier changes in ACPICA require us now to allocate some
> temporary parsing buffers. Fixes bug LP: #1195209
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpica/source/compiler/fwts_iasl_interface.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/acpica/source/compiler/fwts_iasl_interface.c b/src/acpica/source/compiler/fwts_iasl_interface.c
> index 76f6356..84670e4 100644
> --- a/src/acpica/source/compiler/fwts_iasl_interface.c
> +++ b/src/acpica/source/compiler/fwts_iasl_interface.c
> @@ -42,6 +42,11 @@ static void init_asl_core(void)
>         Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT";
>         Gbl_Files[ASL_FILE_STDERR].Handle   = stdout;
>         Gbl_Files[ASL_FILE_STDERR].Filename = "STDOUT";
> +
> +       Gbl_LineBufferSize = 16384;
> +       Gbl_CurrentLineBuffer = NULL;
> +       Gbl_MainTokenBuffer = NULL;
> +       UtExpandLineBuffers();
>  }
>
>  int fwts_iasl_disassemble_aml(const char *aml, const char *outputfile)
> --
> 1.8.1.2
>

Verified the patch fixed the segfault issue.
Thanks Colin. :-)

Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list