gdc: correct max length of config store path [1/1]

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>
This commit is contained in:
Jian Cao
2019-06-20 21:18:42 +08:00
committed by Tao Zeng
parent c7c8254895
commit e1461b601d

View File

@@ -1800,7 +1800,7 @@ static ssize_t config_out_path_show(struct device *dev,
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);