[FFmpeg-devel] [PATCH] *alloc(type)

Alex Converse alex.converse
Sat Nov 20 05:28:15 CET 2010


On Fri, Nov 19, 2010 at 7:37 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> Hi
>
> patchset below fixes the type used in malloc and co
> The sense behind this patch is that feeding things that dont fit in unsigned
> int into *alloc() can lead to successfull allocation of too small arrays which
> is pretty bad.

Is there somewhere this actually happens?

What happens when what we are trying to allocate something that is
bigger than size_t? size_t can be as small as 16-bits according to
c99.

> There are probably more functions that should be changed like av_new_packet()
> but i had to start somewhere and will look into the others too if noone else
> does.
> Note, i will apply this in a few days if there are no objections
>

Regards,
Alex



More information about the ffmpeg-devel mailing list