Originally committed as revision 11062 to svn://svn.ffmpeg.org/ffmpeg/trunk
Michael Niedermayer authored on 2007/11/20 05:14:46... | ... |
@@ -1035,6 +1035,10 @@ static void dvbsub_parse_region_segment(AVCodecContext *avctx, |
1035 | 1035 |
} |
1036 | 1036 |
|
1037 | 1037 |
region->depth = 1 << (((*buf++) >> 2) & 7); |
1038 |
+ if(region->depth<2 || region->depth>8){ |
|
1039 |
+ av_log(avctx, AV_LOG_ERROR, "region depth %d is invalid\n", region->depth); |
|
1040 |
+ region->depth= 4; |
|
1041 |
+ } |
|
1038 | 1042 |
region->clut = *buf++; |
1039 | 1043 |
|
1040 | 1044 |
if (region->depth == 8) |