summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/slub/slabinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/slub/slabinfo.c b/tools/slub/slabinfo.c
index 868cc93..cc1a378 100644
--- a/tools/slub/slabinfo.c
+++ b/tools/slub/slabinfo.c
@@ -1145,7 +1145,7 @@ static void read_slab_dir(void)
switch (de->d_type) {
case DT_LNK:
alias->name = strdup(de->d_name);
- count = readlink(de->d_name, buffer, sizeof(buffer));
+ count = readlink(de->d_name, buffer, sizeof(buffer)-1);
if (count < 0)
fatal("Cannot read symlink %s\n", de->d_name);
OpenPOWER on IntegriCloud