aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/proresenc_kostya.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-18 20:11:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-18 20:11:31 +0200
commite8a2f8cc1209e836bbf7bd42d1087d3154903555 (patch)
tree4b5d420d2c7caa62e0264f187ace3587d1690ad5 /libavcodec/proresenc_kostya.c
parent43b769b0c4f438d3f261d53f7fbd23e28606e78a (diff)
parent58b68e4fdea22e22178e237bda950b09cc6f363a (diff)
downloadffmpeg-e8a2f8cc1209e836bbf7bd42d1087d3154903555.tar.gz
Merge commit '58b68e4fdea22e22178e237bda950b09cc6f363a'
* commit '58b68e4fdea22e22178e237bda950b09cc6f363a': proresenc: Report buffer overflow Conflicts: libavcodec/proresenc_kostya.c See: 52b81ff4635c077b2bc8b8d3637d933b6629d803 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/proresenc_kostya.c')
-rw-r--r--libavcodec/proresenc_kostya.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index bb40a55f63..834698d8ed 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -570,9 +570,9 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic,
}
total_size += sizes[i];
if (put_bits_left(pb) < 0) {
- av_log(avctx, AV_LOG_ERROR, "Serious underevaluation of"
- "required buffer size");
- return AVERROR_BUFFER_TOO_SMALL;
+ av_log(avctx, AV_LOG_ERROR,
+ "Underestimated required buffer size.\n");
+ return AVERROR_BUG;
}
}
return total_size;
@@ -1023,7 +1023,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
slice_hdr = buf;
buf += slice_hdr_size - 1;
init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8);
- ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice);
+ ret = encode_slice(avctx, pic, &pb, sizes, x, y, q,
+ mbs_per_slice);
if (ret < 0)
return ret;