ffmpeg | branch: master | Marton Balint <c...@passwd.hu> | Sat Jan 25 20:25:38 
2025 +0100| [9b5a4c0aea1f8ac2082c223d8b6a5e5d8a896dbd] | committer: Marton 
Balint

avcodec/libxvid: add check for invalid intra/inter matrix values

Signed-off-by: Marton Balint <c...@passwd.hu>

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

 libavcodec/libxvid.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index fbd33b7065..850e691403 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -617,6 +617,10 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
     x->intra_matrix =
     x->inter_matrix = NULL;
 
+    ret = ff_check_codec_matrices(avctx, FF_MATRIX_TYPE_INTRA | 
FF_MATRIX_TYPE_INTER, 1, 255);
+    if (ret < 0)
+        return ret;
+
     if (x->mpeg_quant)
         x->vol_flags |= XVID_VOL_MPEGQUANT;
     if ((avctx->intra_matrix || avctx->inter_matrix)) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to