aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-02-01 20:52:51 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-02-01 22:29:29 -0500
commitba9f16f0eab25552cc81121678c50656a416c2e4 (patch)
tree918c4fc57ea0ecdac6e31621f8e5b6bfbfeff989
parent87e6f866aa0efff1342a84face38d72a9e81f8cf (diff)
trace-cmd: Fix pointer adjustment when skipping padding
When a filter fails to discard an event due to another event writing to the buffer, it makes the first event just padding. But the algorithm to skip the padding added 4 bytes too much to get to the next record. This made the next record corrupted. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-input.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/trace-input.c b/trace-input.c
index aa16ab1..31bcc55 100644
--- a/trace-input.c
+++ b/trace-input.c
@@ -1147,7 +1147,6 @@ translate_data(struct tracecmd_input *handle,
1147 switch (type_len) { 1147 switch (type_len) {
1148 case RINGBUF_TYPE_PADDING: 1148 case RINGBUF_TYPE_PADDING:
1149 *length = data2host4(pevent, *ptr); 1149 *length = data2host4(pevent, *ptr);
1150 *ptr += 4;
1151 *length *= 4; 1150 *length *= 4;
1152 *ptr += *length; 1151 *ptr += *length;
1153 break; 1152 break;