Fixes CID 1634471
---
 libavcodec/rv60dec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c
index d68fa66fa7..86c7aefbca 100644
--- a/libavcodec/rv60dec.c
+++ b/libavcodec/rv60dec.c
@@ -2263,7 +2263,8 @@ static int decode_slice(AVCodecContext *avctx, void 
*tdata, int cu_y, int thread
     thread.avg_linesize[1] = 32;
     thread.avg_linesize[2] = 32;
 
-    init_get_bits8(&gb, s->slice[cu_y].data, s->slice[cu_y].size);
+    if ((ret = init_get_bits8(&gb, s->slice[cu_y].data, s->slice[cu_y].size)) 
< 0)
+        return ret;
 
     for (int cu_x = 0; cu_x < s->cu_width; cu_x++) {
         if ((s->avctx->active_thread_type & FF_THREAD_SLICE) && cu_y)
@@ -2317,7 +2318,8 @@ static int rv60_decode_frame(AVCodecContext *avctx, 
AVFrame * frame,
     if (avpkt->size < header_size)
         return AVERROR_INVALIDDATA;
 
-    init_get_bits8(&gb, avpkt->data + header_size, avpkt->size - header_size);
+    if ((ret = init_get_bits8(&gb, avpkt->data + header_size, avpkt->size - 
header_size)) < 0)
+        return ret;
 
     if ((ret = read_frame_header(s, &gb, &width, &height)) < 0)
         return ret;
-- 
2.45.2

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

Attachment: signature.asc
Description: PGP signature

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

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

Reply via email to