Commit 162218d3 authored by michael's avatar michael

Update safety check as the maximum pixel size is no longer 4.

New max size is 16bit * 4 samples (RGBA).


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18655 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent dbde1454
......@@ -200,7 +200,7 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
}
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/4)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment