const char *table = "/etc/mtab";
FILE *fp;
- strcpy(root_path, tzplatform_getenv(TZ_SYS_STORAGE));
- strcat(root_path, "/USBDrive");
-
+ snprintf(root_path, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_SYS_STORAGE), "/USBDrive");
if (!g_str_has_prefix(dir_path, root_path))
return true;
if(p && p - dir_path < MAX_PATH_LEN)
strncpy(mount_path, dir_path, p - dir_path);
else
- strcpy(mount_path, dir_path);
+ snprintf(mount_path, MAX_PATH_LEN, "%s", dir_path);
fp = setmntent(table, "r");
if (!fp) {
}
endmntent(fp);
- content_info("dir_path[%s] mount_path[%s] ret[%d]", dir_path, mount_path, ret);
+ content_error("[NO ERROR] dir_path[%s] mount_path[%s] ret[%d]", dir_path, mount_path, ret);
return ret;
}