diff mbox series

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

Message ID 20210619135535.28386-1-michael@niedermayer.cc
State Accepted
Commit d866787dacc04079daa73a1a836e849c56cded66
Headers show
Series [FFmpeg-devel] avcodec/hevc_sei: Use get_bits_long() for time_offset_value | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer June 19, 2021, 1:55 p.m. UTC
Fixes: assertion failure
Fixes: crash_1

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

Comments

Michael Niedermayer June 19, 2021, 8:08 p.m. UTC | #1
On Sat, Jun 19, 2021 at 03:55:35PM +0200, Michael Niedermayer wrote:
> Fixes: assertion failure
> Fixes: crash_1
> 
> Found-by: Thuan Pham <tpham.unimelb@gmail.com>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/hevc_sei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
diff mbox series

Patch

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