PD#172716: meson: remote: fix coverity warning
The "strncpy" function does not ensure that the
string "ptable->tab.custom_name"ends with a null character.
So,the function "strncpy" is replaced by the function "snprintf".
This causes "Buffer not null terminated".
Change-Id: I4dd7ce89778ba8be7d60f3463e445f5a3a753061
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
dev_err(chip->dev, "please config mapname item\n");
goto err;
}
- strncpy(ptable->tab.custom_name, uname, CUSTOM_NAME_LEN);
+ snprintf(ptable->tab.custom_name, CUSTOM_NAME_LEN, "%s", uname);
dev_info(chip->dev, "ptable->custom_name = %s\n",
ptable->tab.custom_name);