Skip to content

Commit e1182fa

Browse files
committed
avcodec/mpeg4videoenc: Use 64 bit for times in mpeg4_encode_gop_header()
Fixes truncation Fixes Assertion n <= 31 && value < (1U << n) failed at libavcodec/put_bits.h:169 Fixes: ffmpeg_crash_2.avi Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böhme, Andrew Santosa and Alexandru RazvanCaciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 parent fbb283c commit e1182fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libavcodec/mpeg4videoenc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ void ff_set_mpeg4_time(MpegEncContext *s)
882882

883883
static void mpeg4_encode_gop_header(MpegEncContext *s)
884884
{
885-
int hours, minutes, seconds;
885+
int64_t hours, minutes, seconds;
886886
int64_t time;
887887

888888
put_bits(&s->pb, 16, 0);

0 commit comments

Comments
 (0)