Fixes undefined behavior
Its not known if this condition can be triggered through crafted input.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -306,6 +306,10 @@ static av_cold int decode_init(AVCodecContext *avctx) |
306 | 306 |
|
307 | 307 |
/** generic init */ |
308 | 308 |
s->log2_frame_size = av_log2(avctx->block_align) + 4; |
309 |
+ if (s->log2_frame_size > 25) { |
|
310 |
+ avpriv_request_sample(avctx, "Large block align"); |
|
311 |
+ return AVERROR_PATCHWELCOME; |
|
312 |
+ } |
|
309 | 313 |
|
310 | 314 |
/** frame info */ |
311 | 315 |
s->skip_frame = 1; /* skip first frame */ |