mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/electronicarts: check chunk size.
Fix infinite loop Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bdab2421a5
commit
20769d9349
@ -361,6 +361,11 @@ static int process_ea_header(AVFormatContext *s)
|
||||
if (ea->big_endian)
|
||||
size = av_bswap32(size);
|
||||
|
||||
if (size < 8) {
|
||||
av_log(s, AV_LOG_ERROR, "chunk size too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
switch (blockid) {
|
||||
case ISNh_TAG:
|
||||
if (avio_rl32(pb) != EACS_TAG) {
|
||||
|
Loading…
Reference in New Issue
Block a user