diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 5b392662d100bf95fa96bc51ff63a89b2a1babd9..1029225ee4171828770950559152af9f7cf8c486 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1255,6 +1255,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset, if (event->header.size < hdr_sz || event->header.size > buf_sz) return -1; + buf += hdr_sz; rest = event->header.size - hdr_sz; if (readn(fd, buf, rest) != (ssize_t)rest)