mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
bail on unkown chunks so crap at the end of a wav does cause us to go nuts
This commit is contained in:
parent
ac02c36aaf
commit
de265f236c
1 changed files with 4 additions and 6 deletions
|
@ -367,18 +367,16 @@ riff_read (QFile *f)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
riff_data_t *data = malloc (sizeof (riff_data_t));
|
||||
data->ck = ck;
|
||||
data->data = read_data (f, len);
|
||||
chunk = &data->ck;
|
||||
}
|
||||
// unknown chunk. bail (could be corrupted file)
|
||||
chunk = 0;
|
||||
goto bail;
|
||||
break;
|
||||
}
|
||||
dstring_append (riff_buf, (char *)&chunk, sizeof (chunk));
|
||||
riff = (riff_list_t *) riff_buf->str;
|
||||
chunk = 0;
|
||||
}
|
||||
bail:
|
||||
dstring_append (riff_buf, (char *)&chunk, sizeof (chunk));
|
||||
riff = (riff_list_t *) riff_buf->str;
|
||||
free (riff_buf);
|
||||
|
|
Loading…
Reference in a new issue