History

matroskaenc: Fix hypothetical integer overflows

Fixes CID700562-7 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer committed 14 years ago

Commit dd84efe1 parent b1f517f1 file · +2 −2Browse files

Unified · Split

libavformat/matroskaenc.c+2−2
@@ -1015,8 +1015,8 @@ static int ass_get_duration(const uint8_t *p) · 1014 unmodified lines
10151015 if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d",
10161016 &sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8)
10171017 return 0;
1018− start = 3600000*sh + 60000*sm + 1000*ss + 10*sc;
1019− end = 3600000*eh + 60000*em + 1000*es + 10*ec;
1018+ start = 3600000LL*sh + 60000LL*sm + 1000LL*ss + 10LL*sc;
1019+ end = 3600000LL*eh + 60000LL*em + 1000LL*es + 10LL*ec;
10201020 return end - start;
10211021 }
10221022

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t