aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
209 err = do_write(fd, pos->long_name, pos->long_name_len + 1); 209 err = do_write(fd, pos->long_name, pos->long_name_len + 1);
210 if (err < 0) 210 if (err < 0)
211 return err; 211 return err;
212 err = do_write(fd, zero_buf, len - pos->long_name_len + 1); 212 err = do_write(fd, zero_buf, len - pos->long_name_len - 1);
213 if (err < 0) 213 if (err < 0)
214 return err; 214 return err;
215 } 215 }