[FFmpeg-devel] [PATCH 1/2] avcodec/rv60: negative qp guard

Peter Ross pross at xvid.org
Wed Nov 6 04:29:55 EET 2024


Fixes CID 1634472
---
 libavcodec/rv60dec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c
index d0cc10253b..d68fa66fa7 100644
--- a/libavcodec/rv60dec.c
+++ b/libavcodec/rv60dec.c
@@ -2270,6 +2270,8 @@ static int decode_slice(AVCodecContext *avctx, void *tdata, int cu_y, int thread
             ff_thread_progress_await(&s->progress[cu_y - 1], cu_x + 2);
 
         qp = s->qp + read_qp_offset(&gb, s->qp_off_type);
+        if (qp < 0)
+            return AVERROR_INVALIDDATA;
         sel_qp = calc_sel_qp(s->osvquant, qp);
 
         memset(thread.coded_blk, 0, sizeof(thread.coded_blk));
-- 
2.45.2

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241106/e6ba0d70/attachment.sig>


More information about the ffmpeg-devel mailing list