wav: Stricter check for valid chunk ID.
isascii() is a superset of isalpha() and isblank() so the current code doesn't really make sense. Moreover, isascii(x) is just a funky and non standard way to write x < 128.
This commit is contained in:
parent
2b51d48b38
commit
94b138a3c3
|
@ -165,8 +165,7 @@ static int find_data_chunk(GString *buf, int initial_offset)
|
|||
/* Skip into the samples. */
|
||||
return offset + 8;
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (!isalpha(buf->str[offset + i])
|
||||
&& !isascii(buf->str[offset + i])
|
||||
if (!isalnum(buf->str[offset + i])
|
||||
&& !isblank(buf->str[offset + i]))
|
||||
/* Doesn't look like a chunk ID. */
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue