|
|
|
@ -112,7 +112,7 @@ |
|
|
|
|
static VLC vlc_scalefactors; |
|
|
|
|
static VLC vlc_spectral[11]; |
|
|
|
|
|
|
|
|
|
static const char overread_err[] = "Input buffer exhausted before END element found\n"; |
|
|
|
|
#define overread_err "Input buffer exhausted before END element found\n" |
|
|
|
|
|
|
|
|
|
static int count_channels(uint8_t (*layout)[3], int tags) |
|
|
|
|
{ |
|
|
|
@ -607,7 +607,7 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac, |
|
|
|
|
skip_bits(gb, 3); // mixdown_coeff_index and pseudo_surround
|
|
|
|
|
|
|
|
|
|
if (get_bits_left(gb) < 4 * (num_front + num_side + num_back + num_lfe + num_assoc_data + num_cc)) { |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, overread_err); |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, "decode_pce: " overread_err); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
decode_channel_map(layout_map , AAC_CHANNEL_FRONT, gb, num_front); |
|
|
|
@ -629,7 +629,7 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac, |
|
|
|
|
/* comment field, first byte is length */ |
|
|
|
|
comment_len = get_bits(gb, 8) * 8; |
|
|
|
|
if (get_bits_left(gb) < comment_len) { |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, overread_err); |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, "decode_pce: " overread_err); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
skip_bits_long(gb, comment_len); |
|
|
|
@ -928,7 +928,7 @@ static int skip_data_stream_element(AACContext *ac, GetBitContext *gb) |
|
|
|
|
align_get_bits(gb); |
|
|
|
|
|
|
|
|
|
if (get_bits_left(gb) < 8 * count) { |
|
|
|
|
av_log(ac->avctx, AV_LOG_ERROR, overread_err); |
|
|
|
|
av_log(ac->avctx, AV_LOG_ERROR, "skip_data_stream_element: "overread_err); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
skip_bits_long(gb, 8 * count); |
|
|
|
@ -1062,7 +1062,7 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120], |
|
|
|
|
sect_len_incr = get_bits(gb, bits); |
|
|
|
|
sect_end += sect_len_incr; |
|
|
|
|
if (get_bits_left(gb) < 0) { |
|
|
|
|
av_log(ac->avctx, AV_LOG_ERROR, overread_err); |
|
|
|
|
av_log(ac->avctx, AV_LOG_ERROR, "decode_band_types: "overread_err); |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
if (sect_end > ics->max_sfb) { |
|
|
|
@ -2467,7 +2467,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, |
|
|
|
|
if (elem_id == 15) |
|
|
|
|
elem_id += get_bits(gb, 8) - 1; |
|
|
|
|
if (get_bits_left(gb) < 8 * elem_id) { |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, overread_err); |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, "TYPE_FIL: "overread_err); |
|
|
|
|
err = -1; |
|
|
|
|
goto fail; |
|
|
|
|
} |
|
|
|
|