Author: rathann Date: Fri Oct 4 00:39:38 2013 New Revision: 1263 Log: Fix integer overflow in dvdnav_convert_time().
Currently the calculation will use int and thus overflow for anything larger or equal to 20 hours. Patch by Reimar Döffinger %Reimar^Doeffinger&gmx*de! Modified: trunk/libdvdnav/src/dvdnav.c Modified: trunk/libdvdnav/src/dvdnav.c ============================================================================== --- trunk/libdvdnav/src/dvdnav.c Fri Oct 4 00:30:48 2013 (r1262) +++ trunk/libdvdnav/src/dvdnav.c Fri Oct 4 00:39:38 2013 (r1263) @@ -203,7 +203,7 @@ int64_t dvdnav_convert_time(dvd_time_t * int64_t result; int64_t frames; - result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000; + result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000ull; result += (time->hour & 0x0f) * 60 * 60 * 90000; result += (time->minute >> 4 ) * 10 * 60 * 90000; result += (time->minute & 0x0f) * 60 * 90000; _______________________________________________ DVDnav-discuss mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
