From 255b2138aafa746f08e410e1f239165cec43edaf Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 8 Jun 2011 17:01:44 -0400 Subject: [PATCH] Packet metadata read should substract header size Signed-off-by: Mathieu Desnoyers --- formats/ctf/ctf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index adff1eb7..dc7baf5a 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -508,7 +508,7 @@ int ctf_open_trace_metadata_packet_read(struct ctf_trace *td, FILE *in, return -EINVAL; } - toread = header.content_size / CHAR_BIT; + toread = (header.content_size / CHAR_BIT) - header_sizeof(header); for (;;) { readlen = fread(buf, sizeof(char), min(sizeof(buf), toread), in); -- 2.34.1