mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
lavc/alac: Avoid allocating huge memory blocks for malicious alac input.
This commit is contained in:
parent
8f6c398d44
commit
3357b68bc0
@ -524,7 +524,7 @@ static int alac_set_info(ALACContext *alac)
|
|||||||
|
|
||||||
alac->max_samples_per_frame = bytestream2_get_be32u(&gb);
|
alac->max_samples_per_frame = bytestream2_get_be32u(&gb);
|
||||||
if (!alac->max_samples_per_frame ||
|
if (!alac->max_samples_per_frame ||
|
||||||
alac->max_samples_per_frame > INT_MAX / sizeof(int32_t)) {
|
alac->max_samples_per_frame > 4096 * 4096) {
|
||||||
av_log(alac->avctx, AV_LOG_ERROR,
|
av_log(alac->avctx, AV_LOG_ERROR,
|
||||||
"max samples per frame invalid: %"PRIu32"\n",
|
"max samples per frame invalid: %"PRIu32"\n",
|
||||||
alac->max_samples_per_frame);
|
alac->max_samples_per_frame);
|
||||||
|
Loading…
Reference in New Issue
Block a user