changeset 428:10c91a9d6a2e src

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 Dffinger %Reimar^Doeffinger&gmx*de!
author rathann
date Thu, 03 Oct 2013 22:39:38 +0000
parents c53e528905ec
children 2e6f41e04ca1
files dvdnav.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dvdnav.c	Thu Oct 03 22:30:48 2013 +0000
+++ b/dvdnav.c	Thu Oct 03 22:39:38 2013 +0000
@@ -203,7 +203,7 @@
   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;