[FFmpeg-cvslog] mpc7: return error if packet is too small.
Justin Ruggles
git at videolan.org
Sun Nov 6 20:18:55 CET 2011
ffmpeg | branch: release/0.5 | Justin Ruggles <justin.ruggles at gmail.com> | Wed Sep 14 11:16:42 2011 -0400| [58087a4e640eb2e1ae77de873f9c1aa37e9c8bbe] | committer: Michael Niedermayer
mpc7: return error if packet is too small.
(cherry picked from commit 8290d1f38b438f1b070de67645c8b4a42014c7ac)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 490617b6ffa13f8e49a196a752f927d5ebad6e2b)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58087a4e640eb2e1ae77de873f9c1aa37e9c8bbe
---
libavcodec/mpc7.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 2858255..34f7693 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;
More information about the ffmpeg-cvslog
mailing list