mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
platform/x86: huawei-wmi: Fix a precision vs width printf bug
This was supposed to be precision "%.*s" instead of width "%*s". It's possible that this results in printing beyond the end of the string. Fixes: a970b95345ab ("platform/x86: huawei-wmi: Add debugfs support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
3c27f179d5
commit
2a43c9fc87
1 changed files with 1 additions and 1 deletions
|
@ -616,7 +616,7 @@ static void huawei_wmi_debugfs_call_dump(struct seq_file *m, void *data,
|
|||
seq_printf(m, "0x%llx", obj->integer.value);
|
||||
break;
|
||||
case ACPI_TYPE_STRING:
|
||||
seq_printf(m, "\"%*s\"", obj->string.length, obj->string.pointer);
|
||||
seq_printf(m, "\"%.*s\"", obj->string.length, obj->string.pointer);
|
||||
break;
|
||||
case ACPI_TYPE_BUFFER:
|
||||
seq_puts(m, "{");
|
||||
|
|
Loading…
Reference in a new issue