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

Michael Niedermayer git at videolan.org
Sun Jun 20 20:00:39 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jun 19 15:11:41 2021 +0200| [d866787dacc04079daa73a1a836e849c56cded66] | committer: Michael Niedermayer

avcodec/hevc_sei: Use get_bits_long() for time_offset_value

Fixes: assertion failure
Fixes: crash_1

Found-by: Thuan Pham <tpham.unimelb at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d866787dacc04079daa73a1a836e849c56cded66
---

 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]);
             }
         }
     }



More information about the ffmpeg-cvslog mailing list