On 24/10/14 01:05, Vittorio Giovara wrote:
From: Michael Niedermayer <michae...@gmx.at>
CC: libav-sta...@libav.org
Bug-Id: CID 700562 / CID 700563 / CID 700564 /
CID 700565 / CID 700566 / CID 700567
---
libavformat/matroskaenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index ed68170..a0d5528 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1217,8 +1217,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 = 3600000LL * sh + 60000LL * sm + 1000LL * ss + 10LL * sc;
+ end = 3600000LL * eh + 60000LL * em + 1000LL * es + 10LL * ec;
return end - start;
}
How about bound check those values?
lu
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel