aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rv60dec.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2024-11-06 07:57:17 +1100
committerPeter Ross <pross@xvid.org>2024-11-09 08:50:58 +1100
commitd51a920556cffe6e165b83fcc56d96be9c80e7be (patch)
tree706edd8eae6f61d6843fdf23765577c424b8a750 /libavcodec/rv60dec.c
parent82467b635efced67c1767cb810af1f3c31a2e493 (diff)
downloadffmpeg-d51a920556cffe6e165b83fcc56d96be9c80e7be.tar.gz
avcodec/rv60: negative qp guard
Fixes CID 1634472
Diffstat (limited to 'libavcodec/rv60dec.c')
-rw-r--r--libavcodec/rv60dec.c2
1 files changed, 2 insertions, 0 deletions
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));