summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-18 22:32:56 +0200
committerLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-18 22:32:56 +0200
commit4344822092bd9fd8a5d4d48bf636b44f349acdec (patch)
tree4be700caab5f9099735e89393144d8944d44be13 /src
parentae10f919739b7634a2afad00a081998239684c6b (diff)
boom: fix possiblilty that a non nul-terminated string is produced when showing a symlink
Diffstat (limited to 'src')
-rw-r--r--src/boom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boom.c b/src/boom.c
index 96176f9..14f3250 100644
--- a/src/boom.c
+++ b/src/boom.c
@@ -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");