[FFmpeg-cvslog] electronicarts: prevent overflow during block alignment calculation
Andreas Cadhalpun
git at videolan.org
Sun Jan 29 02:24:25 EET 2017
ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Thu Dec 15 02:14:37 2016 +0100| [8812d047bc850ec0b6afec69ae2d716525b25128] | committer: Andreas Cadhalpun
electronicarts: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8812d047bc850ec0b6afec69ae2d716525b25128
---
libavformat/electronicarts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 30eb723..bfd3fed 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -539,7 +539,7 @@ static int ea_read_header(AVFormatContext *s)
ea->audio_codec = 0;
return 1;
}
- if (ea->bytes <= 0) {
+ if (ea->bytes <= 0 || ea->bytes > 2) {
av_log(s, AV_LOG_ERROR,
"Invalid number of bytes per sample: %d\n", ea->bytes);
ea->audio_codec = AV_CODEC_ID_NONE;
More information about the ffmpeg-cvslog
mailing list