[FFmpeg-devel] [PATCH 2/2] avcodec/h263dec: Avoid parsing extradata repeatedly

Michael Niedermayer michael at niedermayer.cc
Mon Nov 21 20:53:53 EET 2022


On Mon, Nov 21, 2022 at 12:53:26PM +0100, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2022-11-18 00:14:18)
> > Fixes: Timeout
> > Fixes: 52329/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4716563886637056
> > 
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/h263dec.c   | 3 ++-
> >  libavcodec/mpegvideo.h | 1 +
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> > index 71b846ba74..4eab43d939 100644
> > --- a/libavcodec/h263dec.c
> > +++ b/libavcodec/h263dec.c
> > @@ -492,11 +492,12 @@ retry:
> >      } else if (CONFIG_MSMPEG4DEC && s->msmpeg4_version) {
> >          ret = ff_msmpeg4_decode_picture_header(s);
> >      } else if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) {
> > -        if (s->avctx->extradata_size && s->picture_number == 0) {
> > +        if (s->avctx->extradata_size && s->picture_number == 0 && !s->extradata_parsed) {
> 
> Wouldn't it make sense to get rid of the picture_number condition now?

I was thinking about droping it too. I dont know why i didnt, you are correct

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20221121/08777480/attachment.sig>


More information about the ffmpeg-devel mailing list