summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 08b6759287f5..59a9c0b3033e 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -209,7 +209,7 @@ static int __dsos__write_buildid_table(struct list_head *head, int fd)
err = do_write(fd, pos->long_name, pos->long_name_len + 1);
if (err < 0)
return err;
- err = do_write(fd, zero_buf, len - pos->long_name_len + 1);
+ err = do_write(fd, zero_buf, len - pos->long_name_len - 1);
if (err < 0)
return err;
}
OpenPOWER on IntegriCloud