blob: d06118589adbca83c089ab31f15fd80262640c53 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
commit bd1fd3ff4b0437153a6c4717f59ce31a7bba8ca0
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Mon May 21 23:08:05 2018 +0200
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>
(cherry picked from commit e1182fac1afba92a4975917823a5f644bee7e6e8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/mpeg4videoenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git libavcodec/mpeg4videoenc.c libavcodec/mpeg4videoenc.c
index 494452c938..f6a5992df7 100644
--- libavcodec/mpeg4videoenc.c
+++ 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);
|