Quoting Andreas Rheinhardt (2020-05-30 18:05:06) > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > libavcodec/vp9_superframe_bsf.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c > index 57681e29e4..34a47aa69e 100644 > --- a/libavcodec/vp9_superframe_bsf.c > +++ b/libavcodec/vp9_superframe_bsf.c > @@ -108,6 +108,11 @@ static int vp9_superframe_filter(AVBSFContext *ctx, > AVPacket *pkt) > if (res < 0) > return res; > > + if (pkt->size <= 0) { > + res = AVERROR_INVALIDDATA; > + goto done; > + } > + > marker = pkt->data[pkt->size - 1]; > if ((marker & 0xe0) == 0xc0) { > int nbytes = 1 + ((marker >> 3) & 0x3); > -- > 2.20.1
I wonder if it wouldn't be better to add an internal capability for "bsf supports zero-sized packets" and have the internal code reject packets instead. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".