Module: libav Branch: release/0.7 Commit: 56fe62ec944a0f1999d9d5cd6b61bbc340105256
Author: Justin Ruggles <[email protected]> Committer: Reinhard Tartler <[email protected]> Date: Wed Sep 14 11:16:42 2011 -0400 mpc7: return error if packet is too small. (cherry picked from commit 8290d1f38b438f1b070de67645c8b4a42014c7ac) Signed-off-by: Anton Khirnov <[email protected]> --- libavcodec/mpc7.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 8d2c023..c6b63ad 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -203,6 +203,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; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
