From: Jérémie Galarneau Date: Wed, 21 May 2014 17:32:43 +0000 (-0400) Subject: Fix: Check that enumeration container types are integers X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2a610bb7f4b6ca9f95ec6f5b30c064afd3141b43;p=deliverable%2Fbabeltrace.git Fix: Check that enumeration container types are integers Signed-off-by: Jérémie Galarneau --- diff --git a/formats/ctf/ir/event-types.c b/formats/ctf/ir/event-types.c index 7c5047f92..216864834 100644 --- a/formats/ctf/ir/event-types.c +++ b/formats/ctf/ir/event-types.c @@ -359,6 +359,10 @@ struct bt_ctf_field_type *bt_ctf_field_type_enumeration_create( goto error; } + if (integer_container_type->declaration->id != CTF_TYPE_INTEGER) { + goto error; + } + enumeration = g_new0(struct bt_ctf_field_type_enumeration, 1); if (!enumeration) { goto error;