X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=9047b7c22eccb38fea4a4e917e37fab9c3905f2c;hb=1c7ddc31b585071c743368ba9e4d6b5279604ffc;hp=60d9c9f9459d159b7627c9e76927409eccd55272;hpb=0c0cca430c2c19447db78784a1091d2423aa191e;p=babeltrace.git diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 60d9c9f9..9047b7c2 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -548,6 +548,11 @@ int ctf_read_event(struct bt_stream_pos *ppos, struct ctf_stream_definition *str goto error; } + if (pos->last_offset == pos->offset) { + fprintf(stderr, "[error] Invalid 0 byte event encountered.\n"); + return -EINVAL; + } + return 0; error: