- snprintf(tmppath, PATH_MAX, "%s/%s",
- real_tree_origin, symlink_tests_inputs[i].input);
+ ret = snprintf(tmppath, PATH_MAX, "%s/%s",
+ real_tree_origin,
+ symlink_tests_inputs[i].input);
+ if (ret == -1 || ret >= PATH_MAX) {
+ PRINT_ERR("truncation occurred while concatenating paths \"%s\" and \"%s\"",
+ real_tree_origin,
+ symlink_tests_inputs[i].input);
+ fail(name);
+ continue;
+ }