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

Reimar Döffinger Reimar.Doeffinger
Tue Aug 15 18:23:17 CEST 2006


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,
unfortunately we don't know that for ptr.
No idea what would be a good way to fix it...

Greetings,
Reimar D?ffinger




More information about the ffmpeg-cvslog mailing list