Commit 34b6f1ef authored by Michael Niedermayer's avatar Michael Niedermayer

libopencore_amrwb: check packet size

Fix OOM
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 57c0da6f
......@@ -359,6 +359,10 @@ static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,
buf_size, packet_size + 1);
return AVERROR_INVALIDDATA;
}
if (!packet_size) {
av_log(avctx, AV_LOG_ERROR, "amr packet_size invalid\n");
return AVERROR_INVALIDDATA;
}
D_IF_decode(s->state, buf, (short *)s->frame.data[0], _good_frame);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment