diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2009-12-07 12:07:15 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-07 06:26:24 +0100 |
commit | d9541ed3241bb6c2b805d3ea0e87563cf2a0c5c3 (patch) | |
tree | 16993b0a3b165c20b64a91bdf260cfe7e3827617 /tools | |
parent | d8bd9e0aedabcb47887712497bc386a06ddcbd12 (diff) | |
download | linux-d9541ed3241bb6c2b805d3ea0e87563cf2a0c5c3.tar.gz |
perf_event: Fix __dsos__write_buildid_table()
The remain buff size is 'len - pos->long_name_len - 1', not
'len - pos->long_name_len + 1'
This bug was introduced by commit 7691b1e ("perf tools: Misc small
fixes").
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4B1C7F73.80707@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
-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 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; } |