[FFmpeg-devel] RV10 extradata size check
Michael Niedermayer
michaelni
Mon Dec 15 21:12:54 CET 2008
On Mon, Dec 15, 2008 at 09:03:26PM +0100, Laurent Aimar wrote:
> Hi,
>
> On Mon, Dec 15, 2008, Michael Niedermayer wrote:
> > On Mon, Dec 15, 2008 at 08:18:55PM +0100, Laurent Aimar wrote:
> > > The attached patch prevents a segfault in rv10/20 decoder in case too
> > > short or missing extradata is given to libavcodec.
> > > Index: rv10.c
> > > ===================================================================
> > > --- rv10.c (revision 16119)
> > > +++ rv10.c (working copy)
> > > @@ -527,6 +527,11 @@
> > > MpegEncContext *s = avctx->priv_data;
> > > static int done=0;
> > >
> > > + if (avctx->extradata_size < 8 || !avctx->extradata) {
> > > + av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
> > > + return -1;
> > > + }
> >
> > the extradata / NULL check seems redundant
> It is done this way in some other decoders (like vc1, h264).
hmm, maybe these are unneeded ...
> I have attached another patch without the check on extradata pointer.
looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081215/d1c926ca/attachment.pgp>
More information about the ffmpeg-devel
mailing list