diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-23 01:58:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 01:52:51 +0100 |
commit | 728051d9b10790b1fa3eafafe4f3f179df09301d (patch) | |
tree | 95150733c2edf06e5a34b099e49c7b392ad2cc07 | |
parent | 99d58a0da45283fa6f6d135129b9c1166386b5a6 (diff) | |
download | ffmpeg-728051d9b10790b1fa3eafafe4f3f179df09301d.tar.gz |
avcodec/a64multienc: Assert that the Packet size does not grow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 29bbc1be488ea4fc591d3e0ef12f0fc7c8812afb)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/a64multienc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 34e5b2dc99..0d926672f6 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -28,6 +28,7 @@ #include "a64tables.h" #include "elbg.h" #include "internal.h" +#include "libavutil/avassert.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" @@ -379,6 +380,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, pkt->pts = pkt->dts = c->next_pts; c->next_pts = AV_NOPTS_VALUE; + av_assert0(pkt->size >= req_size); pkt->size = req_size; pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = !!req_size; |