Commit 868aef09 authored by Leah Neukirchen's avatar Leah Neukirchen

print_format: use snprintf for bounded strcpy

parent 8c0a5d39
......@@ -1630,7 +1630,7 @@ print_format(struct fileinfo *fi)
struct stat st;
st.st_mode = 0;
strcpy(target, fi->fpath);
snprintf(target, sizeof target, "%s", fi->fpath);
while (j && target[j-1] != '/')
j--;
ssize_t l = readlink(fi->fpath,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment