Message ID | 20221213221651.0d36897a@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 4fb990a5a922d13dff847939a565a0adfa4e1b37 |
Headers | show |
Series | libtraceevent: Calculate dynamic size for dynamic fields as well as arrays | expand |
diff --git a/src/event-parse.c b/src/event-parse.c index d1363a5826d5..8ec95a2ac069 100644 --- a/src/event-parse.c +++ b/src/event-parse.c @@ -1927,7 +1927,7 @@ static int event_read_fields(struct tep_event *event, struct tep_format_field ** free_token(token); - if (field->flags & TEP_FIELD_IS_ARRAY) { + if (field->flags & (TEP_FIELD_IS_ARRAY | TEP_FIELD_IS_DYNAMIC)) { if (field->arraylen) field->elementsize = field->size / field->arraylen; else if (field->flags & TEP_FIELD_IS_DYNAMIC)