[FFmpeg-devel] [PATCH] IFF: Check for invalid width and height in decoder
Ronald S. Bultje
rsbultje
Mon May 10 15:41:36 CEST 2010
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?
Ronald
More information about the ffmpeg-devel
mailing list