Commit 39ee3ddf authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Check creation_time for overflow

Fixes integer overflow
Fixes: 701640
Found-by: 's avatarFound-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c169ab41
......@@ -1186,6 +1186,12 @@ static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time)
if (time) {
if(time >= 2082844800)
time -= 2082844800; /* seconds between 1904-01-01 and Epoch */
if ((int64_t)(time * 1000000ULL) / 1000000 != time) {
av_log(NULL, AV_LOG_DEBUG, "creation_time is not representable\n");
return;
}
avpriv_dict_set_timestamp(metadata, "creation_time", time * 1000000);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment