Fixes ticket #11289 (crash). --- continuation of patch set: https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2024-November/335675.html
libavcodec/rv60dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c
index 86c7aefbca..8ec95e896f 100644
--- a/libavcodec/rv60dec.c
+++ b/libavcodec/rv60dec.c
@@ -2355,6 +2355,8 @@ static int rv60_decode_frame(AVCodecContext *avctx,
AVFrame * frame,
ofs = get_bits_count(&gb) / 8;
for (int i = 0; i < s->cu_height; i++) {
+ if (header_size + ofs >= avpkt->size)
+ return AVERROR_INVALIDDATA;
s->slice[i].data = avpkt->data + header_size + ofs;
s->slice[i].data_size = FFMIN(s->slice[i].size, avpkt->size -
header_size - ofs);
ofs += s->slice[i].size;
--
2.45.2
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
