[FFmpeg-cvslog] ircamdec: prevent overflow during block alignment calculation
Andreas Cadhalpun
git at videolan.org
Tue Jan 31 03:14:02 EET 2017
ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Thu Dec 15 02:14:45 2016 +0100| [3d673078a03a3819df9dba7667f9e5d59b8487d0] | committer: Andreas Cadhalpun
ircamdec: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d673078a03a3819df9dba7667f9e5d59b8487d0
---
libavformat/ircamdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/ircamdec.c b/libavformat/ircamdec.c
index 59f3a49..a6b7a28 100644
--- a/libavformat/ircamdec.c
+++ b/libavformat/ircamdec.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavcodec/internal.h"
#include "avformat.h"
#include "internal.h"
#include "pcm.h"
@@ -87,6 +88,8 @@ static int ircam_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->channels = channels;
+ if (st->codecpar->channels > FF_SANE_NB_CHANNELS)
+ return AVERROR(ENOSYS);
st->codecpar->sample_rate = sample_rate;
st->codecpar->codec_id = ff_codec_get_id(tags, tag);
More information about the ffmpeg-cvslog
mailing list