From 2a610bb7f4b6ca9f95ec6f5b30c064afd3141b43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 21 May 2014 13:32:43 -0400 Subject: [PATCH] Fix: Check that enumeration container types are integers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/event-types.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/formats/ctf/ir/event-types.c b/formats/ctf/ir/event-types.c index 7c5047f9..21686483 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; -- 2.34.1