[MPlayer-cvslog] r35333 - trunk/libmpdemux/demux_audio.c

reimar subversion at mplayerhq.hu
Thu Nov 1 23:22:05 CET 2012


Author: reimar
Date: Thu Nov  1 23:22:04 2012
New Revision: 35333

Log:
Add cast to ensure shift will not overflow.

Modified:
   trunk/libmpdemux/demux_audio.c

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	Thu Nov  1 23:18:33 2012	(r35332)
+++ trunk/libmpdemux/demux_audio.c	Thu Nov  1 23:22:04 2012	(r35333)
@@ -605,7 +605,7 @@ static int demux_audio_open(demuxer_t* d
 	      int32_t srate;
 	      stream_skip(s, 14);
 	      srate = stream_read_int24(s) >> 4;
-	      num_samples  = stream_read_int24(s) << 16;
+	      num_samples  = (uint64_t)stream_read_int24(s) << 16;
 	      num_samples |= stream_read_word(s);
 	      if (num_samples && srate)
 	        sh_audio->i_bps = size * srate / num_samples;


More information about the MPlayer-cvslog mailing list