Browse Source

avformat/sbgdec: Fixes integer overflow in str_to_time() with hours

Fixes: signed integer overflow: 904444 * 3600 cannot be represented in type 'int'
Fixes: 15113/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5764083346833408

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.2
Michael Niedermayer 6 years ago
parent
commit
2a0f23b9d6
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/sbgdec.c

+ 1
- 1
libavformat/sbgdec.c View File

@@ -197,7 +197,7 @@ static int str_to_time(const char *str, int64_t *rtime)
if (end > cur + 1)
cur = end;
}
*rtime = (hours * 3600 + minutes * 60 + seconds) * AV_TIME_BASE;
*rtime = (hours * 3600LL + minutes * 60LL + seconds) * AV_TIME_BASE;
return cur - str;
}



Loading…
Cancel
Save