Merge commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 19:51:17 +0000 (20:51 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 19:51:17 +0000 (20:51 +0100)
* commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c':
  mpeg4audio: check the init_get_bits() return value

Conflicts:
libavcodec/mpeg4audio.c

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

@@@ -82,10 -80,11 +82,15 @@@ int avpriv_mpeg4audio_get_config(MPEG4A
                                   int bit_size, int sync_extension)
  {
      GetBitContext gb;
-     int specific_config_bitindex;
+     int specific_config_bitindex, ret;
  
-     if (bit_size <= 0 || init_get_bits(&gb, buf, bit_size) < 0)
++    if (bit_size <= 0)
 +        return AVERROR_INVALIDDATA;
++
+     ret = init_get_bits(&gb, buf, bit_size);
+     if (ret < 0)
+         return ret;
++
      c->object_type = get_object_type(&gb);
      c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
      c->chan_config = get_bits(&gb, 4);