diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-03-25 18:45:47 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-03-27 01:42:16 +0100 |
commit | aa822007a4bb7a8855fee66af25d99bf5bddac23 (patch) | |
tree | 7081c0a856a0400edc17799a2762f5d0dfe6220b /libavfilter | |
parent | 9f1d2f47db0112d41dbc423c9215ff886512efd3 (diff) | |
download | ffmpeg-aa822007a4bb7a8855fee66af25d99bf5bddac23.tar.gz |
avfilter/vf_showinfo: check if the s12m data size is valid
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_showinfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 79b79db2d3..71534d1fa8 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -318,6 +318,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) break; case AV_FRAME_DATA_S12M_TIMECODE: { uint32_t *tc = (uint32_t*)sd->data; + if (sd->size != 16) { + av_log(ctx, AV_LOG_ERROR, "invalid data"); + break; + } for (int j = 1; j <= tc[0]; j++) { char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0); |