Fix: add stricter checks on packet boundaries
[babeltrace.git] / formats / ctf / writer / event-fields.c
index ad4fcb5a06c1ed5d3ad4e5636fdfab603f832623..c2ad4c2447537b2370823b21f5dee2f238e53f58 100644 (file)
@@ -1131,7 +1131,10 @@ int bt_ctf_field_structure_serialize(struct bt_ctf_field *field,
                }
        }
 
-       ctf_align_pos(pos, field->type->declaration->alignment);
+       if (!ctf_align_pos(pos, field->type->declaration->alignment)) {
+               ret = -1;
+               goto end;
+       }
 
        for (i = 0; i < structure->fields->len; i++) {
                struct bt_ctf_field *field = g_ptr_array_index(
This page took 0.02277 seconds and 4 git commands to generate.