1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced

If its not replaced we would have a negative index used in an array potentially

Helps: CID1440385 Negative array index read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6106177ad6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-13 01:22:18 +02:00
parent d2295ca945
commit 063c906f1f
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -856,7 +856,8 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
avctx->profile = AV_PROFILE_PRORES_4444;
av_log(avctx, AV_LOG_INFO,
"encoding with ProRes 4444+ (ap4h) profile\n");
}
} else
av_assert0(0);
} else if (avctx->profile < AV_PROFILE_PRORES_PROXY
|| avctx->profile > AV_PROFILE_PRORES_XQ) {
av_log(