[FFmpeg-devel] [RFC] WC3 decoder without AVPaletteControl

Reimar Döffinger Reimar.Doeffinger
Sun Nov 21 11:39:53 CET 2010


On Sat, Nov 20, 2010 at 10:06:19PM +0100, Michael Niedermayer wrote:
> On Sat, Nov 20, 2010 at 06:38:56PM +0100, Reimar D?ffinger wrote:
> > On Sat, Nov 20, 2010 at 05:14:25PM +0100, Michael Niedermayer wrote:
> > > > @@ -48,7 +49,7 @@
> > > >  int av_new_packet(AVPacket *pkt, int size)
> > > >  {
> > > >      uint8_t *data= NULL;
> > > > -    if((unsigned)size < (unsigned)size + FF_INPUT_BUFFER_PADDING_SIZE)
> > > > +    if((unsigned)size <= INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)
> > > >          data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
> > > >      if (data){
> > > >          memset(data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
> > > 
> > > i think av_malloc alraedy protects us against this, that said if you prefer
> > > then this change is surely ok as a seperate commit
> > 
> > I didn't like the idea of relying on it, also because
> > av_malloc at least currently uses a hardcoded "16" (which I suspect is for the
> > "memalign hack" version) and not FF_INPUT_BUFFER_PADDING_SIZE.

Sorry, I somehow read the code wrongly. I don't think there's a point in
that change so I did not apply it.

> > Done.
> > More comments?
> 
> no further comments from me

Applied, also bumping minor versions.



More information about the ffmpeg-devel mailing list