printf("path is NULL\n");
return -1;
}
- strncpy(temp, data->pkg_path, sizeof(temp));
+ strncpy(temp, data->pkg_path, sizeof(temp) - 1);
if (strchr(data->pkg_path, '/') == NULL) {
if (getcwd(abs, PKG_NAME_STRING_LEN_MAX - 1) == NULL) {
printf("getcwd() failed\n");
printf("path is NULL\n");
return -1;
}
- strncpy(temp, data->tep_path, sizeof(temp));
+ strncpy(temp, data->tep_path, sizeof(temp) - 1);
if (strchr(data->tep_path, '/') == NULL) {
if (getcwd(abs, PATH_MAX - 1) == NULL || abs[0] == '\0') {
printf("getcwd() failed\n");