mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 22:00:51 +08:00
mpc7: return error if packet is too small.
(cherry picked from commit8290d1f38b) Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit490617b6ff) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
8d1fa1c97e
commit
58087a4e64
@@ -170,6 +170,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx,
|
||||
memset(bands, 0, sizeof(bands));
|
||||
if(buf_size <= 4){
|
||||
av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
out_size = (buf[1] ? c->lastframelen : MPC_FRAME_SIZE) * 4;
|
||||
|
||||
Reference in New Issue
Block a user