[FFmpeg-cvslog] r19996 - trunk/libavcodec/vorbis_dec.c

Michael Niedermayer michaelni
Wed Sep 23 16:12:16 CEST 2009


On Wed, Sep 23, 2009 at 03:38:46PM +0200, Diego Biurrun wrote:
> On Wed, Sep 23, 2009 at 03:08:48PM +0200, michael wrote:
> > 
> > --- trunk/libavcodec/vorbis_dec.c	Wed Sep 23 14:42:12 2009	(r19995)
> > +++ trunk/libavcodec/vorbis_dec.c	Wed Sep 23 15:08:48 2009	(r19996)
> > @@ -638,6 +639,14 @@ static int vorbis_parse_setup_hdr_residu
> >          res_setup->partition_size=get_bits(gb, 24)+1;
> > +        /* Validations to prevent a buffer overflow later. */
> > +        if (res_setup->begin>res_setup->end
> > +        || res_setup->end>vc->blocksize[1]/(res_setup->type==2?1:2)
> > +        || (res_setup->end-res_setup->begin)/res_setup->partition_size>V_MAX_PARTITIONS) {
> > +            av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %d, %d, %d, %d, %d\n", res_setup->type, res_setup->begin, res_setup->end, res_setup->partition_size, vc->blocksize[1]/2);
> > +            return 1;
> > +        }
> 
> That sure is some ugly formatting..

i absolutely agree, do you want to fix it or should i put it on my
todo list?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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-cvslog/attachments/20090923/04d0d924/attachment.pgp>



More information about the ffmpeg-cvslog mailing list