diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-12-15 02:14:37 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2017-01-29 01:20:52 +0100 |
commit | 8812d047bc850ec0b6afec69ae2d716525b25128 (patch) | |
tree | bd6e90a7ec601a6aeab326575ea9d89ac47f7443 | |
parent | e3f13d3a87274d537d319a84e9104f44f84ec3b2 (diff) |
electronicarts: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavformat/electronicarts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 30eb723bd5..bfd3fed3a2 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; |