CC: [email protected]
---

Probably other variables should have the same kind of checks.
Nidhi or Katerina, are you willing to check the codepaths?

 libavcodec/hevc_ps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 5e5d4a7..4c26803 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -924,7 +924,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
                sps->max_transform_hierarchy_depth_intra);
         goto err;
     }
-    if (sps->log2_max_trafo_size > FFMIN(sps->log2_ctb_size, 5)) {
+    if (sps->log2_max_trafo_size > FFMIN(sps->log2_ctb_size, 5) ||
+        sps->log2_max_trafo_size < 2) {
         av_log(s->avctx, AV_LOG_ERROR,
                "max transform block size out of range: %d\n",
                sps->log2_max_trafo_size);
--
1.9.0

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

Reply via email to