X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Fstruct.c;fp=formats%2Fctf%2Ftypes%2Fstruct.c;h=cbf53c1edb58a9d29a03ff449a7c7d16b8401d14;hp=106f682c8ee2d886a9daded1bb32d027e20a7abc;hb=698d455883660a6fa8455096bc15477b06b7a0b0;hpb=9de9c2a388845a38f16ef7c6d10a96fdd5e3b7e6 diff --git a/formats/ctf/types/struct.c b/formats/ctf/types/struct.c index 106f682c..cbf53c1e 100644 --- a/formats/ctf/types/struct.c +++ b/formats/ctf/types/struct.c @@ -33,6 +33,7 @@ int ctf_struct_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_struct_rw(ppos, definition); }