]>
Commit | Line | Data |
---|---|---|
63c68106 JB |
1 | --- bladeenc-0.94.2/bladeenc/samplein.c.orig Tue May 8 14:11:53 2001 |
2 | +++ bladeenc-0.94.2/bladeenc/samplein.c Mon Feb 3 20:47:55 2003 | |
3 | @@ -75,7 +75,7 @@ | |
4 | static int initAIFF (SI_Stream *psInfo); | |
5 | static uint readAIFFSamples (SI_Stream *psInfo, int nSamples, short *wpSamples); | |
6 | ||
7 | -static int myFseek (FILE *fp, int offset); | |
8 | +static int myFseek (FILE *fp, unsigned int offset); | |
9 | ||
10 | ||
11 | ||
12 | @@ -332,6 +332,8 @@ | |
13 | { | |
14 | if (fread (aTemp, sizeof(sFmtChunk), 1, psInfo->fp) != 1) | |
15 | goto unexpEndOfFile; | |
16 | + if (intlLong(&header[4]) < sizeof(sFmtChunk)) | |
17 | + goto unexpEndOfFile; /* I can't find "corrupted file" error code */ | |
18 | myFseek (psInfo->fp, intlLong(&header[4]) - sizeof(sFmtChunk)); | |
19 | fFmtChunkFound = TRUE; | |
20 | } | |
21 | @@ -613,7 +615,7 @@ | |
22 | ||
23 | /* We can't use the real fseek() since you can't seek in a stream (stdin) */ | |
24 | ||
25 | -static int myFseek (FILE *fp, int offset) | |
26 | +static int myFseek (FILE *fp, unsigned int offset) | |
27 | { | |
28 | char dummy[256]; | |
29 |