mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-21 14:26:59 +00:00
electronicarts: check bytes per sample for validity
Prevents division by zero.
This commit is contained in:
parent
e70d202275
commit
e390a9de6f
@ -440,6 +440,11 @@ static int ea_read_header(AVFormatContext *s,
|
||||
ea->audio_codec = 0;
|
||||
return 1;
|
||||
}
|
||||
if (ea->bytes <= 0) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes);
|
||||
ea->audio_codec = CODEC_ID_NONE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* initialize the audio decoder stream */
|
||||
st = avformat_new_stream(s, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user