[FFmpeg-cvslog] r18763 - trunk/libavcodec/mlpdec.c
ramiro
subversion
Wed May 6 18:01:28 CEST 2009
Author: ramiro
Date: Wed May 6 18:01:28 2009
New Revision: 18763
Log:
mlpdec: Fix possible writing out of array bounds introduced by being
under-paranoid in r18651.
Modified:
trunk/libavcodec/mlpdec.c
Modified: trunk/libavcodec/mlpdec.c
==============================================================================
--- trunk/libavcodec/mlpdec.c Wed May 6 17:46:10 2009 (r18762)
+++ trunk/libavcodec/mlpdec.c Wed May 6 18:01:28 2009 (r18763)
@@ -377,6 +377,15 @@ static int read_restart_header(MLPDecode
return -1;
}
+ /* This should happen for TrueHD streams with >6 channels and MLP's noise
+ * type. It is not yet known if this is allowed. */
+ if (s->max_channel > MAX_MATRIX_CHANNEL_MLP && !s->noise_type) {
+ av_log(m->avctx, AV_LOG_ERROR,
+ "Number of channels %d is larger than the maximum supported "
+ "by the decoder. %s\n", s->max_channel+2, sample_message);
+ return -1;
+ }
+
if (s->min_channel > s->max_channel) {
av_log(m->avctx, AV_LOG_ERROR,
"Substream min channel cannot be greater than max channel.\n");
More information about the ffmpeg-cvslog
mailing list