diff options
author | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-18 22:32:56 +0200 |
---|---|---|
committer | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-18 22:32:56 +0200 |
commit | 4344822092bd9fd8a5d4d48bf636b44f349acdec (patch) | |
tree | 4be700caab5f9099735e89393144d8944d44be13 | |
parent | ae10f919739b7634a2afad00a081998239684c6b (diff) |
boom: fix possiblilty that a non nul-terminated string is produced when showing a symlink
-rw-r--r-- | src/boom.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -108,7 +108,7 @@ static int f(const char *fpath, const struct stat *, int typeflag, struct FTW *f printf("%s", fname); if (typeflag == FTW_SL) { char real_name[PATH_MAX] = {0}; - readlink(fpath, real_name, PATH_MAX); + readlink(fpath, real_name, PATH_MAX-1); printf(" -> %s", real_name); } printf("\n"); |