OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1f517f
)
matroskaenc: Fix hypothetical integer overflows
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 20 Oct 2012 16:47:44 +0000
(18:47 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 20 Oct 2012 17:05:15 +0000
(19:05 +0200)
Fixes CID700562-7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/matroskaenc.c
patch
|
blob
|
history
diff --git
a/libavformat/matroskaenc.c
b/libavformat/matroskaenc.c
index
0d387e7
..
bd1344c
100644
(file)
--- a/
libavformat/matroskaenc.c
+++ b/
libavformat/matroskaenc.c
@@
-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",
&sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8)
return 0;
- start = 3600000
*sh + 60000*sm + 1000*ss + 10
*sc;
- end = 3600000
*eh + 60000*em + 1000*es + 10
*ec;
+ start = 3600000
LL*sh + 60000LL*sm + 1000LL*ss + 10LL
*sc;
+ end = 3600000
LL*eh + 60000LL*em + 1000LL*es + 10LL
*ec;
return end - start;
}