diff options
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index f2ceb0f7d669..2143a32638c2 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -1289,7 +1289,7 @@ int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir) | |||
1289 | if (access(linkname, F_OK)) | 1289 | if (access(linkname, F_OK)) |
1290 | goto out_free; | 1290 | goto out_free; |
1291 | 1291 | ||
1292 | if (readlink(linkname, filename, size) < 0) | 1292 | if (readlink(linkname, filename, size - 1) < 0) |
1293 | goto out_free; | 1293 | goto out_free; |
1294 | 1294 | ||
1295 | if (unlink(linkname)) | 1295 | if (unlink(linkname)) |