Commit aa8b0c75 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Yongqiang Liu
Browse files

ipmi: use %*ph to print small buffer

mainline inclusion
from mainline-v5.5-rc1
commit 8ee7b485
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I69WIO


CVE: NA

--------------------------------

Use %*ph format to print small buffer as hex string.

The change is safe since the specifier can handle up to 64 bytes and taking
into account the buffer size of 100 bytes on stack the function has never been
used to dump more than 32 bytes. Note, this also avoids potential buffer
overflow if the length of the input buffer is bigger.

This completely eliminates ipmi_debug_msg() in favour of Dynamic Debug.

Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-Id: <20191011155036.36748-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Conflicts:
	drivers/char/ipmi/ipmi_msghandler.c
v2->v1:
	Add conflicts commit msg
Signed-off-by: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarWang Weiyang <wangweiyang2@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 565c35a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment