Merge commit '522d971c7f5921bebcea2fc50e67056afdabb951'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 1 Jun 2015 00:46:56 +0000 (02:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 1 Jun 2015 00:46:56 +0000 (02:46 +0200)
* commit '522d971c7f5921bebcea2fc50e67056afdabb951':
  xsub: Check memory allocation

Conflicts:
libavcodec/xsubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/xsubdec.c

@@@ -112,9 -116,7 +114,8 @@@ static int decode_frame(AVCodecContext 
          av_freep(&sub->rects[0]);
          av_freep(&sub->rects);
          return AVERROR(ENOMEM);
      }
 +    sub->num_rects = 1;
  
      // read palette
      for (i = 0; i < sub->rects[0]->nb_colors; i++)