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>
This commit is contained in:
Michael Niedermayer 2018-05-21 23:08:05 +02:00
parent fbb283cfef
commit e1182fac1a
1 changed files with 1 additions and 1 deletions

View File

@ -882,7 +882,7 @@ void ff_set_mpeg4_time(MpegEncContext *s)
static void mpeg4_encode_gop_header(MpegEncContext *s) static void mpeg4_encode_gop_header(MpegEncContext *s)
{ {
int hours, minutes, seconds; int64_t hours, minutes, seconds;
int64_t time; int64_t time;
put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, 0);