On Mon, Nov 3, 2014 at 12:54 PM, Luca Barbato <[email protected]> wrote: > On 30/10/14 01:51, Vittorio Giovara wrote: >> >> CC: [email protected] >> Bug-Id: CID 29254 >> --- >> libavcodec/ratecontrol.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c >> index e18878d..08f5ccc 100644 >> --- a/libavcodec/ratecontrol.c >> +++ b/libavcodec/ratecontrol.c >> @@ -176,7 +176,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s) >> >> /* read stats */ >> p = s->avctx->stats_in; >> - for (i = 0; i < rcc->num_entries - s->max_b_frames; i++) { >> + for (i = 0; i < rcc->num_entries - s->max_b_frames && p; i++) { >> RateControlEntry *rce; >> int picture_number; >> int e; >> > > Should be impossible, worth returning a BUG the line above maybe?
p can probably become NULL at the end of the loop because of strchr -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
