You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
electronicarts: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -539,7 +539,7 @@ static int ea_read_header(AVFormatContext *s)
|
|||||||
ea->audio_codec = 0;
|
ea->audio_codec = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (ea->bytes <= 0) {
|
if (ea->bytes <= 0 || ea->bytes > 2) {
|
||||||
av_log(s, AV_LOG_ERROR,
|
av_log(s, AV_LOG_ERROR,
|
||||||
"Invalid number of bytes per sample: %d\n", ea->bytes);
|
"Invalid number of bytes per sample: %d\n", ea->bytes);
|
||||||
ea->audio_codec = AV_CODEC_ID_NONE;
|
ea->audio_codec = AV_CODEC_ID_NONE;
|
||||||
|
Reference in New Issue
Block a user