diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-13 01:22:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-02 22:31:42 +0200 |
commit | 6106177ad66ab28f44520534f386239d2405eeab (patch) | |
tree | 13b8f2e4fd358421c4f13f72e6ec6bc26100c1c2 | |
parent | 160b81ce2a87b0835125da7c72ab7ed8c0918c45 (diff) | |
download | ffmpeg-6106177ad66ab28f44520534f386239d2405eeab.tar.gz |
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>
-rw-r--r-- | libavcodec/proresenc_anatoliy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 2fb96e9cf5..8709f400d0 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -857,7 +857,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( |