mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 09:32:43 +00:00
avformat/iamf_parse: fix inverted subblock duration validation
The check on variable subblock durations had an inverted comparison, rejecting valid multi-subblock parameters and failing to catch subblock durations exceeding the remaining time.
This commit is contained in:
@@ -668,7 +668,7 @@ static int param_parse(void *s, IAMFContext *c, AVIOContext *pb,
|
||||
|
||||
if (constant_subblock_duration == 0) {
|
||||
subblock_duration = ffio_read_leb(pb);
|
||||
if (duration - total_duration > subblock_duration) {
|
||||
if (subblock_duration > duration - total_duration) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid subblock durations in parameter_id %u\n", parameter_id);
|
||||
av_free(param);
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
Reference in New Issue
Block a user