shithub: libdvdcss

Download patch

ref: ec7c3a567dda8afd1516b49d33672557f981eb51
parent: cce6baf1edf30fd39650eea94e752f5be515feb9
author: Thomas Guillem <thomas@gllm.fr>
date: Wed Jan 28 11:29:40 EST 2015

dvdcss_open_stream: cast to off_t

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

--- a/src/device.c
+++ b/src/device.c
@@ -546,7 +546,7 @@
 
 static int stream_seek( dvdcss_t dvdcss, int i_blocks )
 {
-    off_t i_seek = i_blocks * DVDCSS_BLOCK_SIZE;
+    off_t i_seek = (off_t) i_blocks * (off_t) DVDCSS_BLOCK_SIZE;
 
     if( !dvdcss->p_stream_cb->pf_seek )
         return -1;
@@ -642,7 +642,7 @@
 {
     off_t i_size, i_ret, i_ret_blocks;
 
-    i_size = i_blocks * DVDCSS_BLOCK_SIZE;
+    i_size = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
 
     if( !dvdcss->p_stream_cb->pf_read )
         return -1;