Skip to content
Snippets Groups Projects
Commit 73b16198 authored by Janne Grunau's avatar Janne Grunau
Browse files

electronicarts: check bytes per sample for validity

Prevents division by zero.
parent b348c852
No related branches found
No related tags found
No related merge requests found
......@@ -434,6 +434,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment