On Mon, 20 Jan 2014 11:25:30 +0100, Luca Barbato <[email protected]> wrote: > From: Michael Niedermayer <[email protected]> > > This matches how its done for SPS/PPS. > Fixes null pointer dereference. > > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind > Signed-off-by: Luca Barbato <[email protected]> > --- > libavcodec/hevc_ps.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c > index 372ce28..1ce8d2e 100644 > --- a/libavcodec/hevc_ps.c > +++ b/libavcodec/hevc_ps.c > @@ -633,6 +633,13 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) > goto err; > } > > + if (!s->vps_list[sps->vps_id]) { > + av_log(s->avctx, AV_LOG_ERROR, "VPS %d does not exist\n", > + sps->vps_id); > + ret = AVERROR_INVALIDDATA; > + goto err; > + } > +
Ok -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
