changeset 9536:f522c8e05a29 libavcodec

Update safety check as the maximum pixel size is no longer 4. New max size is 16bit * 4 samples (RGBA).
author michael
date Wed, 22 Apr 2009 01:54:05 +0000
parents 4a4929da4ddc
children 654f5260a87d
files utils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Wed Apr 22 01:50:15 2009 +0000
+++ b/utils.c	Wed Apr 22 01:54:05 2009 +0000
@@ -200,7 +200,7 @@
 }
 
 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);