From f034252a13dbbf3c526b32d695a0257c478d24cd Mon Sep 17 00:00:00 2001 From: Lekensteyn Date: Wed, 29 Feb 2012 00:49:34 +0100 Subject: [PATCH] Don't share buffer for muid/args, it'll be overwritten --- bbswitch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bbswitch.c b/bbswitch.c index d17c05b..f0cd673 100644 --- a/bbswitch.c +++ b/bbswitch.c @@ -111,12 +111,13 @@ static int acpi_call_dsm(acpi_handle handle, const char muid[16], int revid, err = acpi_evaluate_object(handle, "_DSM", &input, &output); if (err) { - char tmp[5 * 16]; /* enough space for muid or args with separators */ + char muid_str[5 * 16]; + char args_str[5 * 4]; printk(KERN_WARNING "bbswitch: failed to evaluate _DSM {%s} %X %X" " {%s}: %s\n", - buffer_to_string(muid, 16, tmp), revid, func, - buffer_to_string(args, 4, tmp), acpi_format_exception(err)); + buffer_to_string(muid, 16, muid_str), revid, func, + buffer_to_string(args, 4, args_str), acpi_format_exception(err)); return err; }