[FFmpeg-devel] [PATCH 2/2] avcodec/vp3: Check that theora is theora

Michael Niedermayer michael at niedermayer.cc
Wed Jul 24 15:37:47 EEST 2019


On Mon, Jul 22, 2019 at 07:07:57AM +0200, Reimar Döffinger wrote:
> 
> 
> On 22.07.2019, at 01:25, Michael Niedermayer <michael at niedermayer.cc> wrote:
> 
> > Fixes: Timeout (2min -> 100ms)
> > Fixes: 15366/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-5737849938247680
> > 
> > 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/vp3.c | 2 ++
> > 1 file changed, 2 insertions(+)
> > 
> > diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
> > index a6f759ebf5..8a165c1275 100644
> > --- a/libavcodec/vp3.c
> > +++ b/libavcodec/vp3.c
> > @@ -2957,6 +2957,8 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
> >     s->theora_header = 0;
> >     s->theora = get_bits_long(gb, 24);
> >     av_log(avctx, AV_LOG_DEBUG, "Theora bitstream version %X\n", s->theora);
> > +    if (!s->theora)
> > +        return AVERROR_INVALIDDATA;
> 
> That seems rather strict, a 1-bit error in this field and we don't even try?
> Maybe set to 1 instead with a request for sample?

ok, will post a new patch

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

Elect your leaders based on what they did after the last election, not
based on what they say before an election.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190724/94b1a341/attachment.sig>


More information about the ffmpeg-devel mailing list