X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Fvariant.c;fp=formats%2Fctf%2Ftypes%2Fvariant.c;h=fc7b7ad449d935ea4dcf9e32afda839463250141;hp=b3d6396a6f9f075f21be4fd71e871a55c2c038f6;hb=70fd5a515016525961d4bef0d627616abdc9bc28;hpb=0ace7505e59ef4fd014ba800e22767d0b58261e9 diff --git a/formats/ctf/types/variant.c b/formats/ctf/types/variant.c index b3d6396a..fc7b7ad4 100644 --- a/formats/ctf/types/variant.c +++ b/formats/ctf/types/variant.c @@ -33,6 +33,7 @@ int ctf_variant_rw(struct bt_stream_pos *ppos, struct bt_definition *definition) struct bt_declaration *declaration = definition->declaration; struct ctf_stream_pos *pos = ctf_pos(ppos); - ctf_align_pos(pos, declaration->alignment); + if (!ctf_align_pos(pos, declaration->alignment)) + return -EFAULT; return bt_variant_rw(ppos, definition); }