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

index 1bb90e2b9dd7de4f57163eb149b6642257566f92,a7dd7ee6286badea5c9856b55266c15f0487a76e..2db263ba29e759421019db830a1d2c699e82fb88
@@@ -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++)