Merge commit '18f4fa251b0eb36392839f5bf6180f280dc04d8d'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 21:54:56 +0000 (22:54 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 21:55:27 +0000 (22:55 +0100)
* commit '18f4fa251b0eb36392839f5bf6180f280dc04d8d':
  aac_adtstoasc_bsf: Check extradata memory allocation

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

@@@ -87,9 -87,10 +87,11 @@@ static int aac_adtstoasc_filter(AVBitSt
              buf_size -= get_bits_count(&gb)/8;
              buf      += get_bits_count(&gb)/8;
          }
 +        av_free(avctx->extradata);
          avctx->extradata_size = 2 + pce_size;
          avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+         if (!avctx->extradata)
+             return AVERROR(ENOMEM);
  
          init_put_bits(&pb, avctx->extradata, avctx->extradata_size);
          put_bits(&pb, 5, hdr.object_type);