[FFmpeg-cvslog] r18655 - trunk/libavcodec/utils.c

michael subversion
Wed Apr 22 03:54:06 CEST 2009


Author: michael
Date: Wed Apr 22 03:54:05 2009
New Revision: 18655

Log:
Update safety check as the maximum pixel size is no longer 4.
New max size is 16bit * 4 samples (RGBA).

Modified:
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Wed Apr 22 03:50:15 2009	(r18654)
+++ trunk/libavcodec/utils.c	Wed Apr 22 03:54:05 2009	(r18655)
@@ -200,7 +200,7 @@ void avcodec_align_dimensions(AVCodecCon
 }
 
 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);



More information about the ffmpeg-cvslog mailing list