[xiph-commits] r17016 - trunk/vorbis-tools/oggenc
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Wed Mar 24 01:28:33 PDT 2010
Author: xiphmont
Date: 2010-03-24 01:28:33 -0700 (Wed, 24 Mar 2010)
New Revision: 17016
Modified:
trunk/vorbis-tools/oggenc/audio.c
Log:
Correct seek overflow that was throwing some WAV inputs into an infinite
loop.
Fixes #1598
Modified: trunk/vorbis-tools/oggenc/audio.c
===================================================================
--- trunk/vorbis-tools/oggenc/audio.c 2010-03-24 08:21:29 UTC (rev 17015)
+++ trunk/vorbis-tools/oggenc/audio.c 2010-03-24 08:28:33 UTC (rev 17016)
@@ -96,13 +96,14 @@
return NULL;
}
-static int seek_forward(FILE *in, int length)
+static int seek_forward(FILE *in, unsigned int length)
{
if(fseek(in, length, SEEK_CUR))
{
/* Failed. Do it the hard way. */
unsigned char buf[1024];
- int seek_needed = length, seeked;
+ unsigned int seek_needed = length;
+ int seeked;
while(seek_needed > 0)
{
seeked = fread(buf, 1, seek_needed>1024?1024:seek_needed, in);
More information about the commits
mailing list