Re: [FFmpeg-devel] [PATCH] diracdec: check if reference could not be allocated

2015-05-06 Thread Andreas Cadhalpun
On 06.05.2015 02:26, Michael Niedermayer wrote: > On Tue, May 05, 2015 at 11:51:48PM +0200, Andreas Cadhalpun wrote: >> s->ref_pics[i] is later used as ref argument of interpolate_refplane, >> where it is dereferenced. >> >> If it is NULL, it causes a segmentation fault. >> >> Signed-off-by: Andrea

Re: [FFmpeg-devel] [PATCH] diracdec: check if reference could not be allocated

2015-05-05 Thread Michael Niedermayer
On Tue, May 05, 2015 at 11:51:48PM +0200, Andreas Cadhalpun wrote: > s->ref_pics[i] is later used as ref argument of interpolate_refplane, > where it is dereferenced. > > If it is NULL, it causes a segmentation fault. > > Signed-off-by: Andreas Cadhalpun > --- > libavcodec/diracdec.c | 6 ++

Re: [FFmpeg-devel] [PATCH] diracdec: check if reference could not be allocated

2015-05-05 Thread Andreas Cadhalpun
On 06.05.2015 00:00, Timothy Gu wrote: > On Tue, May 5, 2015 at 2:51 PM Andreas Cadhalpun < > andreas.cadhal...@googlemail.com> wrote: >> >> +if (!s->ref_pics[i]) { >> +av_log(s->avctx, AV_LOG_ERROR, "Reference could not be >> allocated\n"); >> +return -1; >> +

Re: [FFmpeg-devel] [PATCH] diracdec: check if reference could not be allocated

2015-05-05 Thread Timothy Gu
On Tue, May 5, 2015 at 2:51 PM Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote: > > +if (!s->ref_pics[i]) { > +av_log(s->avctx, AV_LOG_ERROR, "Reference could not be > allocated\n"); > +return -1; > +} > + AVERROR(ENOMEM) Timothy __

[FFmpeg-devel] [PATCH] diracdec: check if reference could not be allocated

2015-05-05 Thread Andreas Cadhalpun
s->ref_pics[i] is later used as ref argument of interpolate_refplane, where it is dereferenced. If it is NULL, it causes a segmentation fault. Signed-off-by: Andreas Cadhalpun --- libavcodec/diracdec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/diracdec.c b/libavcodec/