mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 12:37:01 +03:00
large mp4 header handling
This commit is contained in:
@@ -314,9 +314,15 @@ static int read_mp4_header(unsigned long *samplerate_p, unsigned char *channels_
|
||||
a->pos += bytes;
|
||||
a->consume = consume - bytes;
|
||||
break;
|
||||
} else {
|
||||
} else if (len > streambuf->size) {
|
||||
// can't process an atom larger than streambuf!
|
||||
LOG_ERROR("atom %s too large for buffer %u %u", type, len, streambuf->size);
|
||||
return -1;
|
||||
} else {
|
||||
// make sure there is 'len' contiguous space
|
||||
_buf_unwrap(streambuf, len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user