[FFmpeg-cvslog] avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced

Michael Niedermayer git at videolan.org
Sun Jun 2 23:33:12 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon May 13 01:22:18 2024 +0200| [6106177ad66ab28f44520534f386239d2405eeab] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6106177ad66ab28f44520534f386239d2405eeab
---

 libavcodec/proresenc_anatoliy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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(



More information about the ffmpeg-cvslog mailing list