summaryrefslogtreecommitdiff
path: root/libavcodec/mpc7.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-14 11:16:42 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-02 10:34:39 -0400
commit8290d1f38b438f1b070de67645c8b4a42014c7ac (patch)
tree6ba8b66cfe5b96c5970540f8fac779b3219df9bb /libavcodec/mpc7.c
parentc8b5c4d27409dfdcec80868686b173ba446c998b (diff)
mpc7: return error if packet is too small.
Diffstat (limited to 'libavcodec/mpc7.c')
-rw-r--r--libavcodec/mpc7.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 02c83fcdc8..6f79c7b51e 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;