Mercurial > mplayer.hg
changeset 35239:f8759138eefa
Add cast to ensure shift will not overflow.
author | reimar |
---|---|
date | Thu, 01 Nov 2012 22:22:04 +0000 |
parents | 036f41724884 |
children | db0feadeac0a |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Thu Nov 01 22:18:33 2012 +0000 +++ b/libmpdemux/demux_audio.c Thu Nov 01 22:22:04 2012 +0000 @@ -605,7 +605,7 @@ 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;