[FFmpeg-devel] [PATCH] gifdec: drop pointless casting

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Dec 22 19:15:42 CET 2012


On 20 Dec 2012, at 20:06, Piotr Bandurski <ami_stuff at o2.pl> wrote:
> Hi,
> 
>> - if( (unsigned)s->screen_width > 32767
>> - || (unsigned)s->screen_height > 32767){
>> + if (s->screen_width > 32767 ||
>> + s->screen_height > 32767) {
> 
> Would removing this check be enough to support gifs up to 65535x65535?

No, because they need almost 4 GB of RAM to be stored and we do not allow such huge allocations.
That said I believe this check is rather a hack and should use the standard function to validate image dimensions, which probably would allow it to at least work with 65535x1 or 1x65535 resolutions etc...


More information about the ffmpeg-devel mailing list