PD#SWPL-10123
Problem:
max size of config store path is wrong
Solution:
use macro CONFIG_PATH_LENG to set
max length of config store path
Verify:
verified on g12b-w400
Change-Id: I0e2d09515099f77ff95505706a0c3b588135c083
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
static ssize_t config_out_path_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t len)
{
- if (strlen(buf) >= sizeof(config_out_file)) {
+ if (strlen(buf) >= CONFIG_PATH_LENG) {
pr_info("err: path too long\n");
} else {
strncpy(config_out_file, buf, CONFIG_PATH_LENG - 1);