Browse Source

avformat/sccdec: Use larger intermediate for ts/next_ts computation

Fixes: signed integer overflow: 92237203 * 33 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SCC_fuzzer-6603769487949824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.4
Michael Niedermayer 5 years ago
parent
commit
92b1949191
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/sccdec.c

+ 2
- 2
libavformat/sccdec.c View File

@@ -93,7 +93,7 @@ static int scc_read_header(AVFormatContext *s)
break;
}

ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33;
ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33LL;

while (!ff_text_eof(&tr)) {
len = ff_subtitles_read_line(&tr, line2, sizeof(line2));
@@ -117,7 +117,7 @@ static int scc_read_header(AVFormatContext *s)
}
}

next_ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33;
next_ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33LL;

pos = ff_text_pos(&tr);
lline = (char *)&line;


Loading…
Cancel
Save