mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/wmalosslessdec: check block_align
Code copied from wmaprodec Fixes null pointer dereference Fixes Ticket3002 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ad8fbddb94
commit
286beebdc3
@ -178,6 +178,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
unsigned int channel_mask;
|
unsigned int channel_mask;
|
||||||
int i, log2_max_num_subframes;
|
int i, log2_max_num_subframes;
|
||||||
|
|
||||||
|
if (!avctx->block_align) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
|
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user