[FFmpeg-devel] [PATCH] libvorbis.c: use memmove() when source/dest overlap and add buffer checks

Michael Niedermayer michaelni
Wed May 12 23:41:25 CEST 2010


On Tue, May 11, 2010 at 12:03:20AM +0200, Stefano Sabatini wrote:
> On date Monday 2010-05-10 09:28:45 -0700, Thierry Foucu encoded:
> > Hi,
> > 
> > $subject
> > 
> > Find these problems when using version 1.3.1 of the vorbis library
> > 
> > 
> > Index: libavcodec/libvorbis.c
> > ===================================================================
> > --- libavcodec/libvorbis.c (revision 23079)
> > +++ libavcodec/libvorbis.c (working copy)
> > @@ -171,9 +171,13 @@
> >               * not, apparently the end of stream decision is in libogg. */
> >              if(op.bytes==1)
> >                  continue;
> > +            if (context->buffer_index + sizeof(ogg_packet) + op.bytes >
> > BUFFER_SIZE) {
> > +              av_log(avccontext, AV_LOG_ERROR, "libvorbis: buffer
> > overflow.");
> > +              return -1;
> > +            }
> 
> Patch mangled, please send it as an attachment. Also it should return
> something different from -1, maybe AVERROR_INVALIDDATA should be ok.

and indention is 4 spaces not 1 space

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20100512/23acbf43/attachment.pgp>



More information about the ffmpeg-devel mailing list