[FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information
Tomas Härdin
tjoppen at acc.umu.se
Tue Nov 9 15:44:04 EET 2021
sön 2021-11-07 klockan 12:32 +0100 skrev Marton Balint:
>
> > +
> > + while (channel_ordering_ptr->uid[0]) {
> > + if (IS_KLV_KEY(channel_ordering_ptr->uid,
> > mca_sub_descriptor->mca_label_dictionary_id)) {
>
> You should check if current_channel < desciptor->channels here, and
> if
> not, then warn the user and break out of the loop. Otherwise
> current_channel can grow out of array limits.
>
> It should also be checked that channel_ordering_ptr->index <
> descriptor->channels, and if not, then similarly, warn the user and
> break
> out.
>
> Maybe a hard failure (returning AVERROR_INVALIDDATA) is not
> necessary, to
> allow some slightly invalid metadata?
We should be as strict as we can get away with. Else we encourage
laxness in other implementations.
/Tomas
More information about the ffmpeg-devel
mailing list