Fix: Missing check that token linked-list is not NULL
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 May 2015 18:22:01 +0000 (14:22 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 May 2015 18:22:01 +0000 (14:22 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/visitor.c

index 5838ddd5007d44cac74dd6a88039dfde64bf709f..6fc6e30ed679359df9f1527ca10f24dfc56c687f 100644 (file)
@@ -646,6 +646,11 @@ int get_field_path(struct ctf_type_visitor_context *context,
                token = strtok_r(NULL, ".", &save_ptr);
        }
 
+       if (!path_tokens) {
+               ret = -1;
+               goto error;
+       }
+
        *field_path = bt_ctf_field_path_create();
        if (!*field_path) {
                ret = -1;
This page took 0.024812 seconds and 4 git commands to generate.