Commit dd84efe3 authored by Michael Niedermayer's avatar Michael Niedermayer

matroskaenc: Fix hypothetical integer overflows

Fixes CID700562-7
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b1f517f5
...@@ -1015,8 +1015,8 @@ static int ass_get_duration(const uint8_t *p) ...@@ -1015,8 +1015,8 @@ static int ass_get_duration(const uint8_t *p)
if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d", if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d",
&sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8) &sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8)
return 0; return 0;
start = 3600000*sh + 60000*sm + 1000*ss + 10*sc; start = 3600000LL*sh + 60000LL*sm + 1000LL*ss + 10LL*sc;
end = 3600000*eh + 60000*em + 1000*es + 10*ec; end = 3600000LL*eh + 60000LL*em + 1000LL*es + 10LL*ec;
return end - start; return end - start;
} }
......
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