---
libavcodec/amrnbdec.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index fff0e72..5fe746a 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -946,6 +946,13 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void
*data,
}
buf_out = (float *)p->avframe.data[0];
+ if (buf_size < frame_sizes_nb[p->cur_frame_mode] + 1) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Frame too small (%d bytes). Truncated file?\n", buf_size);
+ *got_frame_ptr = 0;
+ return buf_size;
+ }
+
p->cur_frame_mode = unpack_bitstream(p, buf, buf_size);
if (p->cur_frame_mode == MODE_DTX) {
av_log_missing_feature(avctx, "dtx mode", 1);
--
1.7.5.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel