Sample-Id: 00001533-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
---
 libavcodec/hevc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index c33de8e..5d520fa 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2606,6 +2606,12 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t 
*nal, int length)
             }
         }
 
+        if (s->sh.slice_type != I_SLICE && !s->ref->refPicList) {
+            av_log(s->avctx, AV_LOG_WARNING,
+                  "The reference lists for the current slice is missing.\n");
+            return AVERROR_INVALIDDATA;
+        }
+
         ctb_addr_ts = hls_slice_data(s);
         if (ctb_addr_ts >= (s->sps->ctb_width * s->sps->ctb_height)) {
             s->is_decoded = 1;
-- 
1.8.5.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to