[FFmpeg-devel] [PATCH] IFF: Check for invalid width and height in decoder

Sebastian Vater cdgs.basty
Mon May 10 15:48:34 CEST 2010


Ronald S. Bultje a ?crit :
> Hi,
>
> On Mon, May 10, 2010 at 9:39 AM, Sebastian Vater
> <cdgs.basty at googlemail.com> wrote:
>   
>> Ronald S. Bultje a ?crit :
>>     
>>> Why don't you use avcodec_check_dimensions()?
>>>       
>> Because it doesn't check for == 0, which I have to...also
>> avcodec_check_dimensions prints them unsigned.
>>     
>
> int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
>     if((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
>         return 0;
>
>     av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h);
>     return AVERROR(EINVAL);
> }
>
> What am I missing?
>   

Strange...somebody told me yesterday that it won't check for 0.

Anyway...fixed!

-- 

Best regards,
                   :-) Basty/CDGS (-:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-decoder-width-height-check.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100510/15c08e07/attachment.bin>



More information about the ffmpeg-devel mailing list