[FFmpeg-devel] [PATCH] avcodec/hevc_sei: Use get_bits_long() for time_offset_value

Michael Niedermayer michael at niedermayer.cc
Sat Jun 19 16:55:35 EEST 2021


Fixes: assertion failure
Fixes: crash_1

Found-by: Thuan Pham <tpham.unimelb at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/hevc_sei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index c881c4338c..e6ae777852 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -386,7 +386,7 @@ static int decode_nal_sei_timecode(HEVCSEITimeCode *s, GetBitContext *gb)
 
             s->time_offset_length[i] = get_bits(gb, 5);
             if (s->time_offset_length[i] > 0) {
-                s->time_offset_value[i] = get_bits(gb, s->time_offset_length[i]);
+                s->time_offset_value[i] = get_bits_long(gb, s->time_offset_length[i]);
             }
         }
     }
-- 
2.17.1



More information about the ffmpeg-devel mailing list