Merge commit '35cbc98b720db95b923cb2d745f77bb2ee4363dc'

* commit '35cbc98b720db95b923cb2d745f77bb2ee4363dc':
  alac: Check that the channels fit at the given offset

Conflicts:
	libavcodec/alac.c

See: b53f89710b03c4c832bb03e4e132b1ace17fb4e4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-04 12:56:28 +02:00
commit f1b15c1ef9

View File

@ -463,9 +463,8 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
} }
channels = (element == TYPE_CPE) ? 2 : 1; channels = (element == TYPE_CPE) ? 2 : 1;
if ( ch + channels > alac->channels if (ch + channels > alac->channels ||
|| ff_alac_channel_layout_offsets[alac->channels - 1][ch] + channels > alac->channels ff_alac_channel_layout_offsets[alac->channels - 1][ch] + channels > alac->channels) {
) {
av_log(avctx, AV_LOG_ERROR, "invalid element channel count\n"); av_log(avctx, AV_LOG_ERROR, "invalid element channel count\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }