Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lib_ccx/ts_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,13 @@ int copy_capbuf_demux_data(struct ccx_demuxer *ctx, struct demuxer_data **data,

if (cinfo->codec == CCX_CODEC_TELETEXT)
{
if (cinfo->capbuflen > BUFSIZE - ptr->len)
{
fatal(CCX_COMMON_EXIT_BUG_BUG,
"Teletext packet (%ld) larger than remaining buffer (%lld).\n",
cinfo->capbuflen, BUFSIZE - ptr->len);
}

memcpy(ptr->buffer + ptr->len, cinfo->capbuf, cinfo->capbuflen);
ptr->len += cinfo->capbuflen;
return CCX_OK;
Expand Down
Loading