[Ffmpeg-cvslog] r5996 - trunk/libavutil/mem.c

Michael Niedermayer michaelni
Wed Aug 16 09:28:43 CEST 2006


Hi

On Tue, Aug 15, 2006 at 06:23:17PM +0200, Reimar D?ffinger wrote:
> Hello,
> On Sun, Aug 13, 2006 at 11:09:00PM +0200, michael wrote:
> >  #ifndef MEMALIGN_HACK
> >      ptr= realloc(ptr, size);
> > -    if(((int)ptr&15) || !ptr)
> > +assert(((int)((void*)0)&15) == 0); //for the null pointer pedants
> > +    if(!((int)ptr&15))
> >          return ptr;
> >  #endif
> >  
> >      ptr2= av_malloc(size);
> >      if(ptr && ptr2)
> >          memcpy(ptr2, ptr, size);
> 
> This would have to be the minimum of the size for ptr and ptr2,

indeed


> unfortunately we don't know that for ptr.
> No idea what would be a good way to fix it...

me neither :(

ill wait a few days and if noone came up with a solution (or people start 
reporting segfalts) then ill reverse the aligned av_realoc() changes

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-cvslog mailing list