Use the right header sizes for reading .aiff and .au files.

From nicm@.
This commit is contained in:
Alexandre Ratchov 2017-03-27 13:58:46 +02:00
parent f49f0ccd14
commit f6579c4341
1 changed files with 2 additions and 2 deletions

View File

@ -534,7 +534,7 @@ afile_aiff_readhdr(struct afile *f)
unsigned int csize, rsize, nfr = 0, pos = 0, offs;
int comm_done = 0, comp;
if (!afile_readhdr(f, &form, sizeof(struct wav_riff)))
if (!afile_readhdr(f, &form, sizeof(struct aiff_form)))
return 0;
if (memcmp(&form.id, &aiff_id_form, 4) != 0) {
log_puts(f->path);
@ -656,7 +656,7 @@ afile_au_readhdr(struct afile *f)
struct au_hdr hdr;
unsigned int fmt;
if (!afile_readhdr(f, &hdr, sizeof(struct wav_riff)))
if (!afile_readhdr(f, &hdr, sizeof(struct au_hdr)))
return 0;
if (memcmp(&hdr.id, &au_id, 4) != 0) {
log_puts(f->path);