From fcc2519bd610aab07e929ce4847865ad88d9896c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 27 May 2017 15:46:04 -0400 Subject: [PATCH] Tests: possible dereference of NULL argument to strcmp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- tests/lib/test_ctf_writer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index 8942f2f1..ead55812 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -470,6 +470,7 @@ void append_simple_event(struct bt_ctf_stream_class *stream_class, ok(iter, "bt_ctf_field_enumeration_get_mappings returns an iterator to matching mappings"); ret = bt_ctf_field_type_enumeration_mapping_iterator_get_signed(iter, &ret_char, NULL, NULL); ok(!ret && ret_char, "bt_ctf_field_type_enumeration_mapping_iterator_get_signed return a mapping name"); + assert(ret_char); ok(!strcmp(ret_char, mapping_name_negative_test), "bt_ctf_field_enumeration_get_single_mapping_name returns the correct mapping name with an signed container"); ret = bt_ctf_event_set_payload(simple_event, "enum_field", enum_field); -- 2.34.1