From afd5c6a03f7b95db6d43f78b515901e74ccf15da Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Sun, 9 Mar 2008 23:38:11 +0000 Subject: Fix (another) overflow when seeking in long WMA files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16597 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/wma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/codecs') diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c index 03b000686c..80797df064 100644 --- a/apps/codecs/wma.c +++ b/apps/codecs/wma.c @@ -403,7 +403,7 @@ static int seek(int ms, asf_waveformatex_t* wfx) /*estimate packet number from bitrate*/ int initial_packet = ci->curpos/wfx->packet_size; - int packet_num = (ms*(wfx->bitrate>>3))/wfx->packet_size/1000; + int packet_num = (((int64_t)ms)*(wfx->bitrate>>3))/wfx->packet_size/1000; int last_packet = ci->id3->filesize / wfx->packet_size; if (packet_num > last_packet) { -- cgit v1.2.3