mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user