forked from FFmpeg/FFmpeg
libopencore_amrwb: check packet size
Fix OOM Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
57c0da6fe4
commit
34b6f1efa2
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue