On 09/20/2012 03:51 AM, Luca Barbato wrote: > From: Michael Niedermayer <michae...@gmx.at> > > Additional safety in case a special ogg stream is crafted > with the proper number of header packets. > > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > --- > libavformat/oggparsetheora.c | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c > index df7a89c..632c4ef 100644 > --- a/libavformat/oggparsetheora.c > +++ b/libavformat/oggparsetheora.c > @@ -131,8 +131,13 @@ theora_gptopts(AVFormatContext *ctx, int idx, uint64_t > gp, int64_t *dts) > struct ogg *ogg = ctx->priv_data; > struct ogg_stream *os = ogg->streams + idx; > struct theora_params *thp = os->private; > - uint64_t iframe = gp >> thp->gpshift; > - uint64_t pframe = gp & thp->gpmask; > + uint64_t iframe, pframe; > + > + if (!thp) > + return AV_NOPTS_VALUE; > + > + iframe = gp >> thp->gpshift; > + pframe = gp & thp->gpmask; > > if (thp->version < 0x030201) > iframe++;
The commit message isn't very clear, but the patch looks fine. -Justin _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel