1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavf/subviewerdec: fix potential timing overflows.

Should fix CID733779 and CID733780.
This commit is contained in:
Clément Bœsch 2012-10-21 01:08:17 +02:00
parent 044c0e62ea
commit 1ea3c03743

View File

@ -57,8 +57,8 @@ static int read_ts(const char *s, int64_t *start, int *duration)
if (sscanf(s, "%u:%u:%u.%u,%u:%u:%u.%u", if (sscanf(s, "%u:%u:%u.%u,%u:%u:%u.%u",
&hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) { &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) {
end = (hh2*3600 + mm2*60 + ss2) * 100 + ms2; end = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
*start = (hh1*3600 + mm1*60 + ss1) * 100 + ms1; *start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
*duration = end - *start; *duration = end - *start;
return 0; return 0;
} }