lavf: fix arithmetic overflows in avformat_seek_file()
authorMans Rullgard <mans@mansr.com>
Fri, 7 Dec 2012 13:53:56 +0000 (13:53 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 13 Mar 2013 13:14:54 +0000 (14:14 +0100)
commitd8fbae3c3c63505774288abe7a98404a507b60e3
tree17388cba70cb0017301d9f40f96e7690011ef749
parentf82e127dd9c7c0d54bf6400f83c7825e571f9a9e
lavf: fix arithmetic overflows in avformat_seek_file()

The values compared here can be more than INT64_MAX apart.  Since the
difference is always positive, converting to uint64_t before subtracting
gives the correct result without overflows.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 91ac403b1316d59b4f43c4ea0f237e24cec2819a)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/utils.c