input/wav: increase search range for data chunk, report errors
This commit is contained in:
parent
288f8ce23c
commit
b944e336d6
|
@ -37,7 +37,7 @@
|
|||
#define MIN_DATA_CHUNK_OFFSET 45
|
||||
|
||||
/* Expect to find the "data" chunk within this offset from the start. */
|
||||
#define MAX_DATA_CHUNK_OFFSET 256
|
||||
#define MAX_DATA_CHUNK_OFFSET 1024
|
||||
|
||||
#define WAVE_FORMAT_PCM_ 0x0001
|
||||
#define WAVE_FORMAT_IEEE_FLOAT_ 0x0003
|
||||
|
@ -175,6 +175,9 @@ static int find_data_chunk(GString *buf, int initial_offset)
|
|||
offset += 8 + RL32(buf->str + offset + 4);
|
||||
}
|
||||
|
||||
if (offset > MAX_DATA_CHUNK_OFFSET)
|
||||
return -1;
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue