You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
committed by
Michael Niedermayer
parent
9f1d2f47db
commit
aa822007a4
@@ -318,6 +318,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
|||||||
break;
|
break;
|
||||||
case AV_FRAME_DATA_S12M_TIMECODE: {
|
case AV_FRAME_DATA_S12M_TIMECODE: {
|
||||||
uint32_t *tc = (uint32_t*)sd->data;
|
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++) {
|
for (int j = 1; j <= tc[0]; j++) {
|
||||||
char tcbuf[AV_TIMECODE_STR_SIZE];
|
char tcbuf[AV_TIMECODE_STR_SIZE];
|
||||||
av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
|
av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
|
||||||
|
Reference in New Issue
Block a user