On Fri, Nov 21, 2014 at 12:57 PM, Vittorio Giovara <[email protected]> wrote: > From: Luca Barbato <[email protected]> > > Prevent an uninitialized data access. > > CC: [email protected] > Bug-Id: CID 703824 / CID 703825 > Signed-off-by: Vittorio Giovara <[email protected]> > --- > libavcodec/proresenc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c > index 3a82c2c..7c39c23 100644 > --- a/libavcodec/proresenc.c > +++ b/libavcodec/proresenc.c > @@ -757,7 +757,8 @@ static int find_slice_quant(AVCodecContext *avctx, const > AVFrame *pic, > const int max_quant = ctx->profile_info->max_quant; > int error, bits, bits_limit; > int mbs, prev, cur, new_score; > - int slice_bits[TRELLIS_WIDTH], slice_score[TRELLIS_WIDTH]; > + int slice_bits[TRELLIS_WIDTH] = { SCORE_LIMIT }; > + int slice_score[TRELLIS_WIDTH] = { SCORE_LIMIT }; > int overquant; > uint16_t *qmat; > int linesize[4], line_add; > @@ -820,10 +821,9 @@ static int find_slice_quant(AVCodecContext *avctx, const > AVFrame *pic, > if (ctx->alpha_bits) > bits += estimate_alpha_plane(ctx, &error, src, linesize[3], > mbs_per_slice, q, td->blocks[3]); > - if (bits > 65000 * 8) { > + if (bits > 65000 * 8) > error = SCORE_LIMIT; > - break; > - } > + > slice_bits[q] = bits; > slice_score[q] = error; > } > -- > 1.9.3 (Apple Git-50) >
ping -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
