aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-14 11:16:42 -0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-06 19:49:12 +0100
commit58087a4e640eb2e1ae77de873f9c1aa37e9c8bbe (patch)
treed42d2ee7e45138bd1271327c87382e5944f37821 /libavcodec
parent8d1fa1c97e1d11614489d2ea746be1a435563dd0 (diff)
downloadffmpeg-58087a4e640eb2e1ae77de873f9c1aa37e9c8bbe.tar.gz
mpc7: return error if packet is too small.
(cherry picked from commit 8290d1f38b438f1b070de67645c8b4a42014c7ac) Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 490617b6ffa13f8e49a196a752f927d5ebad6e2b) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpc7.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 2858255152..34f76932b8 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -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;