summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videoenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-05-21 23:08:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-05-27 23:10:12 +0200
commite1182fac1afba92a4975917823a5f644bee7e6e8 (patch)
treea0bd01a8fc7186d2b92816c61ae4bfde766e0a23 /libavcodec/mpeg4videoenc.c
parentfbb283cfefb1865375718c4a56ce608d96a4a8ed (diff)
downloadffmpeg-e1182fac1afba92a4975917823a5f644bee7e6e8.tar.gz
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>
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r--libavcodec/mpeg4videoenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 494452c938..f6a5992df7 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -882,7 +882,7 @@ void ff_set_mpeg4_time(MpegEncContext *s)
static void mpeg4_encode_gop_header(MpegEncContext *s)
{
- int hours, minutes, seconds;
+ int64_t hours, minutes, seconds;
int64_t time;
put_bits(&s->pb, 16, 0);