1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit '35cbc98b720db95b923cb2d745f77bb2ee4363dc'

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

Conflicts:
	libavcodec/alac.c

See: b53f89710b
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;
if ( ch + channels > alac->channels
|| ff_alac_channel_layout_offsets[alac->channels - 1][ch] + channels > alac->channels
) {
if (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");
return AVERROR_INVALIDDATA;
}