mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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:
parent
fbb283cfef
commit
e1182fac1a
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user