[FFmpeg-devel] WTV oledate_to_iso8601 overflow

Matej Knopp matej.knopp at inmethod.com
Mon May 9 03:19:37 CEST 2011

Sorry about that, will post patch next time. Anyway, seems to be fixed now.


On Sun, May 8, 2011 at 4:19 AM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Sun, May 08, 2011 at 01:14:35AM -0400, Matej Knopp wrote:
>> Hi,
>> I'm getting a crash when parsing a WTV file on Windows (mingw32).
>> The problem is in
>> static void oledate_to_iso8601(char *buf, int buf_size, int64_t value)
>> There seem to be two things wrong with it
>> a) if the time value is very big is  (year 10000) - time_t overflows
>> and strftime crashes
>> b) the current implementation seems bit weird, as ole time is time in
>> days since 30 December 1899
>> I tried the following implementation and it seems to work
> A diff would be far more useful.
> But your max_time values isn't a good idea, it allows for a time
> range of max. 68 years!!
> Instead the gmtime result needs to be checked against NULL.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list