diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-08-29 16:35:56 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-08-29 16:35:56 +0200 |
commit | 868aef09596db3ee7dc17519342550329f52ae29 (patch) | |
tree | e93f83382e0193e220b5a019c1f7df14ae9361e9 | |
parent | 8c0a5d39b90cc7691d3f8d9044d596b6585521db (diff) | |
download | lr-868aef09596db3ee7dc17519342550329f52ae29.tar.gz lr-868aef09596db3ee7dc17519342550329f52ae29.tar.xz lr-868aef09596db3ee7dc17519342550329f52ae29.zip |
print_format: use snprintf for bounded strcpy
-rw-r--r-- | lr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lr.c b/lr.c index 754eafa..229591a 100644 --- a/lr.c +++ b/lr.c @@ -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, |